bisect: fix exiting when checkout failed in bisect_start()
[git/git.git] / git-bisect.sh
index e0ca3fb..5fb4291 100755 (executable)
@@ -129,7 +129,8 @@ bisect_start() {
                start_head=$(cat "$GIT_DIR/BISECT_START")
                if test "z$mode" != "z--no-checkout"
                then
-                       git checkout "$start_head" --
+                       git checkout "$start_head" -- ||
+                       die "$(eval_gettext "Checking out '\$start_head' failed. Try 'git bisect reset <validbranch>'.")"
                fi
        else
                # Get rev from where we start.