aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-18 22:08:39 -0700
committerJunio C Hamano <junkio@cox.net>2006-10-18 22:08:39 -0700
commit8719f93b5619a0df99cec6e919a260f01ab76184 (patch)
treecd522c1eb0c6ef399cd097aba4dce35505903732
parent32788ad6f892aeafad3cd2bcb8807091f7c404d7 (diff)
parent9b709e47ae46079efe1d7858580dcf5b8cf6ea33 (diff)
downloadgit-8719f93b5619a0df99cec6e919a260f01ab76184.tar.gz
git-8719f93b5619a0df99cec6e919a260f01ab76184.tar.xz
Merge branch 'pb/bisect'
* pb/bisect: bisect reset: Leave the tree in usable state if git-checkout failed
-rwxr-xr-xgit-bisect.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 06a8d2694..6da31e87a 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -179,11 +179,12 @@ bisect_reset() {
*)
usage ;;
esac
- git checkout "$branch" &&
- rm -fr "$GIT_DIR/refs/bisect"
- rm -f "$GIT_DIR/refs/heads/bisect" "$GIT_DIR/head-name"
- rm -f "$GIT_DIR/BISECT_LOG"
- rm -f "$GIT_DIR/BISECT_NAMES"
+ if git checkout "$branch"; then
+ rm -fr "$GIT_DIR/refs/bisect"
+ rm -f "$GIT_DIR/refs/heads/bisect" "$GIT_DIR/head-name"
+ rm -f "$GIT_DIR/BISECT_LOG"
+ rm -f "$GIT_DIR/BISECT_NAMES"
+ fi
}
bisect_replay () {