]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/bisect.c
Merge branch 'rj/bisect-already-used-branch'
[thirdparty/git.git] / builtin / bisect.c
index 73017402671d30ce7f868a9691f9bb6f520695e1..c64c8d715a5cae653103e6a802e0251afdea80d1 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "hex.h"
 #include "parse-options.h"
 #include "bisect.h"
 #include "refs.h"
@@ -244,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"