worktree: rename copy-pasted variable

As the commit message of 04a3dfb8b5 ("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 <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Martin Ågren
2020-09-27 15:15:46 +02:00
committed by Junio C Hamano
parent cfaf9f05c6
commit fb07bd4297

View File

@ -365,15 +365,15 @@ int is_worktree_being_bisected(const struct worktree *wt,
const char *target) const char *target)
{ {
struct wt_status_state state; struct wt_status_state state;
int found_rebase; int found_bisect;
memset(&state, 0, sizeof(state)); memset(&state, 0, sizeof(state));
found_rebase = wt_status_check_bisect(wt, &state) && found_bisect = wt_status_check_bisect(wt, &state) &&
state.branch && state.branch &&
starts_with(target, "refs/heads/") && starts_with(target, "refs/heads/") &&
!strcmp(state.branch, target + strlen("refs/heads/")); !strcmp(state.branch, target + strlen("refs/heads/"));
wt_status_state_free_buffers(&state); wt_status_state_free_buffers(&state);
return found_rebase; return found_bisect;
} }
/* /*