aboutsummaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorAnders Kaseorg <andersk@MIT.EDU>2009-10-13 17:02:24 -0400
committerJunio C Hamano <gitster@pobox.com>2009-10-13 23:19:02 -0700
commit6b87ce231d14b3804974fba27576f1f2ba77cfb0 (patch)
tree4a543b4583a8712f3208cd5aa5120426839374d4 /git-bisect.sh
parent78d553b7d7b269bb22ebd8b1198657c37484a3a0 (diff)
downloadgit-6b87ce231d14b3804974fba27576f1f2ba77cfb0.tar.gz
git-6b87ce231d14b3804974fba27576f1f2ba77cfb0.tar.xz
bisect reset: Allow resetting to any commit, not just a branch
‘git bisect reset’ accepts an optional argument specifying a branch to check out after cleaning up the bisection state. This lets you specify an arbitrary commit. In particular, this provides a way to clean the bisection state without moving HEAD: ‘git bisect reset HEAD’. This may be useful if you are not interested in the state before you began a bisect, especially if checking out the old commit would be expensive and invalidate most of your compiled tree. Clarify the ‘git bisect reset’ documentation to explain this optional argument, which was previously mentioned only in the usage message. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 6f6f03966..8b3c5858a 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -13,8 +13,8 @@ git bisect skip [(<rev>|<range>)...]
mark <rev>... untestable revisions.
git bisect next
find next bisection to test and check it out.
-git bisect reset [<branch>]
- finish bisection search and go back to branch.
+git bisect reset [<commit>]
+ finish bisection search and go back to commit.
git bisect visualize
show bisect status in gitk.
git bisect replay <logfile>
@@ -311,8 +311,8 @@ bisect_reset() {
}
case "$#" in
0) branch=$(cat "$GIT_DIR/BISECT_START") ;;
- 1) git show-ref --verify --quiet -- "refs/heads/$1" ||
- die "$1 does not seem to be a valid branch"
+ 1) git rev-parse --quiet --verify "$1^{commit}" > /dev/null ||
+ die "'$1' is not a valid commit"
branch="$1" ;;
*)
usage ;;