From: Christian Couder Date: Wed, 21 Sep 2011 05:17:24 +0000 (+0200) Subject: bisect: fix exiting when checkout failed in bisect_start() X-Git-Tag: v1.7.8-rc0~64^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1acf11717f01b542e099544796f00df567a66e90;p=git.git bisect: fix exiting when checkout failed in bisect_start() Commit 4796e823 ("bisect: introduce --no-checkout support into porcelain." Aug 4 2011) made checking out the branch where we started depends on the "checkout" mode. But unfortunately it lost the "|| exit" part after the checkout command. As it makes no sense to continue if the checkout failed and as people have already complained that the error message given when we just exit in this case is not clear, see: http://thread.gmane.org/gmane.comp.version-control.git/180733/ this patch adds a "|| die " part after the checkout command. Signed-off-by: Christian Couder Acked-by: Jon Seymour Signed-off-by: Junio C Hamano --- diff --git a/git-bisect.sh b/git-bisect.sh index e0ca3fb85..5fb42917a 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -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 '.")" fi else # Get rev from where we start.