[PATCH v2 6/7] worktree: rename copy-pasted variable
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Sep 27, 2020, 13:15 UTC
- Message-ID
- <70e6cea3312bf0a587e6614ae06fb5fab17163ba.1600281351.git.martin.agren@gmail.com>
- In-Reply-To
- <cover.1600281350.git.martin.agren@gmail.com>
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> --- worktree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/worktree.c b/worktree.c index 5c9ecec466..b5702aa4eb 100644 --- a/worktree.c +++ b/worktree.c @@ -377,15 +377,15 @@ int is_worktree_being_bisected(const struct worktree *wt, const char *target) { struct wt_status_state state; - int found_rebase; + int found_bisect; memset(&state, 0, sizeof(state)); - found_rebase = wt_status_check_bisect(wt, &state) && - state.branch && - starts_with(target, "refs/heads/") && - !strcmp(state.branch, target + strlen("refs/heads/")); + found_bisect = wt_status_check_bisect(wt, &state) && + state.branch && + starts_with(target, "refs/heads/") && + !strcmp(state.branch, target + strlen("refs/heads/")); wt_status_state_free_buffers(&state); - return found_rebase; + return found_bisect; } /*
-- 2.28.0.277.g9b3c35fffd