summaryrefslogtreecommitdiff
path: root/worktree.c
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2020-09-27 13:15:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-27 21:21:47 (GMT)
commitfb07bd42975bcbfbc29d4a3ef1bff1039a469336 (patch)
tree0b605ea6328699f40b2a09869e385e64e0386b1a /worktree.c
parentcfaf9f05c6174b520082036c0f1439adf9c4fbf7 (diff)
downloadgit-fb07bd42975bcbfbc29d4a3ef1bff1039a469336.zip
git-fb07bd42975bcbfbc29d4a3ef1bff1039a469336.tar.gz
git-fb07bd42975bcbfbc29d4a3ef1bff1039a469336.tar.bz2
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>
Diffstat (limited to 'worktree.c')
-rw-r--r--worktree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/worktree.c b/worktree.c
index f5eb6e7..6a236d2 100644
--- a/worktree.c
+++ b/worktree.c
@@ -365,15 +365,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;
}
/*