summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eef12a9)
raw | patch | inline | side by side (parent: eef12a9)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 5 Aug 2011 17:09:23 +0000 (10:09 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 5 Aug 2011 17:13:21 +0000 (10:13 -0700) |
Fix a few remaining lines that indented with spaces.
Also simplify the logic of checking out the original branch and reporting
error during "bisect reset".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Also simplify the logic of checking out the original branch and reporting
error during "bisect reset".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-bisect.sh | patch | blob | history |
diff --git a/git-bisect.sh b/git-bisect.sh
index 1f3c46da83b61b3b8a7fce5084206d32596604f0..22c4da5a9a77d0124e613303f29adbbb537c60be 100755 (executable)
--- a/git-bisect.sh
+++ b/git-bisect.sh
die "$(eval_gettext "unrecognised option: '\$arg'")" ;;
*)
rev=$(git rev-parse -q --verify "$arg^{commit}") || {
- test $has_double_dash -eq 1 &&
- die "$(eval_gettext "'\$arg' does not appear to be a valid revision")"
- break
+ test $has_double_dash -eq 1 &&
+ die "$(eval_gettext "'\$arg' does not appear to be a valid revision")"
+ break
}
case $bad_seen in
0) state='bad' ; bad_seen=1 ;;
start_head=$(cat "$GIT_DIR/BISECT_START")
if test "z$mode" != "z--no-checkout"
then
- git checkout "$start_head" --
+ git checkout "$start_head" --
fi
else
# Get rev from where we start.
if test $# = 0
then
if test -n "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" &&
- type gitk >/dev/null 2>&1
+ type gitk >/dev/null 2>&1
then
set gitk
else
*)
usage ;;
esac
- if ! test -f "$GIT_DIR/BISECT_HEAD"
+
+ if ! test -f "$GIT_DIR/BISECT_HEAD" && ! git checkout "$branch" --
then
- if ! git checkout "$branch" --
- then
- die "$(eval_gettext "Could not check out original HEAD '\$branch'.
+ die "$(eval_gettext "Could not check out original HEAD '\$branch'.
Try 'git bisect reset <commit>'.")"
- fi
fi
bisect_clean_state
}