bisect: further style nitpicks
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>maint
parent
eef12a9a77
commit
43b8ff4b14
|
@ -94,9 +94,9 @@ bisect_start() {
|
||||||
die "$(eval_gettext "unrecognised option: '\$arg'")" ;;
|
die "$(eval_gettext "unrecognised option: '\$arg'")" ;;
|
||||||
*)
|
*)
|
||||||
rev=$(git rev-parse -q --verify "$arg^{commit}") || {
|
rev=$(git rev-parse -q --verify "$arg^{commit}") || {
|
||||||
test $has_double_dash -eq 1 &&
|
test $has_double_dash -eq 1 &&
|
||||||
die "$(eval_gettext "'\$arg' does not appear to be a valid revision")"
|
die "$(eval_gettext "'\$arg' does not appear to be a valid revision")"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case $bad_seen in
|
case $bad_seen in
|
||||||
0) state='bad' ; bad_seen=1 ;;
|
0) state='bad' ; bad_seen=1 ;;
|
||||||
|
@ -125,7 +125,7 @@ bisect_start() {
|
||||||
start_head=$(cat "$GIT_DIR/BISECT_START")
|
start_head=$(cat "$GIT_DIR/BISECT_START")
|
||||||
if test "z$mode" != "z--no-checkout"
|
if test "z$mode" != "z--no-checkout"
|
||||||
then
|
then
|
||||||
git checkout "$start_head" --
|
git checkout "$start_head" --
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Get rev from where we start.
|
# Get rev from where we start.
|
||||||
|
@ -332,7 +332,7 @@ bisect_visualize() {
|
||||||
if test $# = 0
|
if test $# = 0
|
||||||
then
|
then
|
||||||
if test -n "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" &&
|
if test -n "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" &&
|
||||||
type gitk >/dev/null 2>&1
|
type gitk >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
set gitk
|
set gitk
|
||||||
else
|
else
|
||||||
|
@ -364,13 +364,11 @@ bisect_reset() {
|
||||||
*)
|
*)
|
||||||
usage ;;
|
usage ;;
|
||||||
esac
|
esac
|
||||||
if ! test -f "$GIT_DIR/BISECT_HEAD"
|
|
||||||
|
if ! test -f "$GIT_DIR/BISECT_HEAD" && ! git checkout "$branch" --
|
||||||
then
|
then
|
||||||
if ! git checkout "$branch" --
|
die "$(eval_gettext "Could not check out original HEAD '\$branch'.
|
||||||
then
|
|
||||||
die "$(eval_gettext "Could not check out original HEAD '\$branch'.
|
|
||||||
Try 'git bisect reset <commit>'.")"
|
Try 'git bisect reset <commit>'.")"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
bisect_clean_state
|
bisect_clean_state
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue