Skip to content

Commit fb07bd4

Browse files
Martin Ågrengitster
authored andcommitted
worktree: rename copy-pasted variable
As the commit message of 04a3dfb ("worktree.c: check whether branch is bisected in another worktree", 2016-04-22) indicates, the function `is_worktree_being_bisected()` is based on the older function `is_worktree_being_rebased()`. This heritage can also be seen in the name of the variable where we store our return value: It was never adapted while copy-editing and remains as `found_rebase`. Rename the variable to make clear that we're looking for a bisect(ion), nothing else. Signed-off-by: Martin Ågren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cfaf9f0 commit fb07bd4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

worktree.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,15 +365,15 @@ int is_worktree_being_bisected(const struct worktree *wt,
365365
const char *target)
366366
{
367367
struct wt_status_state state;
368-
int found_rebase;
368+
int found_bisect;
369369

370370
memset(&state, 0, sizeof(state));
371-
found_rebase = wt_status_check_bisect(wt, &state) &&
372-
state.branch &&
373-
starts_with(target, "refs/heads/") &&
374-
!strcmp(state.branch, target + strlen("refs/heads/"));
371+
found_bisect = wt_status_check_bisect(wt, &state) &&
372+
state.branch &&
373+
starts_with(target, "refs/heads/") &&
374+
!strcmp(state.branch, target + strlen("refs/heads/"));
375375
wt_status_state_free_buffers(&state);
376-
return found_rebase;
376+
return found_bisect;
377377
}
378378

379379
/*

0 commit comments

Comments
 (0)