Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-03-20 01:03:11 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-20 01:03:11 +0300
commitc79786c486cb84e2f9dad41a04d982bb23075815 (patch)
tree05d065c327325e03f31f306a4d05ea5cff9376d1 /builtin/bisect.c
parent4a25b911cdb0cd79b6ab8b60ccbece77df03340d (diff)
parent7fb89047cc3957bf829233786c00edd5d87f0225 (diff)
Merge branch 'rj/bisect-already-used-branch'
Allow "git bisect reset" to check out the original branch when the branch is already checked out in a different worktree linked to the same repository. * rj/bisect-already-used-branch: bisect: fix "reset" when branch is checked out elsewhere
Diffstat (limited to 'builtin/bisect.c')
-rw-r--r--builtin/bisect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/bisect.c b/builtin/bisect.c
index e8ee4a4dc8..c64c8d715a 100644
--- a/builtin/bisect.c
+++ b/builtin/bisect.c
@@ -245,7 +245,8 @@ static int bisect_reset(const char *commit)
struct child_process cmd = CHILD_PROCESS_INIT;
cmd.git_cmd = 1;
- strvec_pushl(&cmd.args, "checkout", branch.buf, "--", NULL);
+ strvec_pushl(&cmd.args, "checkout", "--ignore-other-worktrees",
+ branch.buf, "--", NULL);
if (run_command(&cmd)) {
error(_("could not check out original"
" HEAD '%s'. Try 'git bisect"