summaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2007-11-20 06:39:53 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-20 01:01:46 -0800
commitfce0499fad13815d936c1068b7a064030f543b3d (patch)
treedd749b31846e1c17feff0f76e252de8ff2dc5de6 /git-bisect.sh
parent6459c7c6786aa9bda0c7a095c9db66c36da0e5f0 (diff)
downloadgit-fce0499fad13815d936c1068b7a064030f543b3d.tar.gz
Bisect reset: do nothing when not bisecting.
Before this patch, using "git bisect reset" when not bisecting did a "git checkout master" for no good reason. This also happened using "git bisect replay" when not bisecting because "bisect_replay" starts by calling "bisect_reset". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 414f813be7..6f20a297a5 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -328,6 +328,10 @@ bisect_visualize() {
}
bisect_reset() {
+ test -f "$GIT_DIR/BISECT_NAMES" || {
+ echo "We are not bisecting."
+ return
+ }
case "$#" in
0) if [ -s "$GIT_DIR/head-name" ]; then
branch=`cat "$GIT_DIR/head-name"`