bisect: replace "; then" with "\n<tab>*then"
Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6021be866f
commit
eef12a9a77
@ -198,7 +198,8 @@ is_expected_rev() {
|
|||||||
|
|
||||||
check_expected_revs() {
|
check_expected_revs() {
|
||||||
for _rev in "$@"; do
|
for _rev in "$@"; do
|
||||||
if ! is_expected_rev "$_rev"; then
|
if ! is_expected_rev "$_rev"
|
||||||
|
then
|
||||||
rm -f "$GIT_DIR/BISECT_ANCESTORS_OK"
|
rm -f "$GIT_DIR/BISECT_ANCESTORS_OK"
|
||||||
rm -f "$GIT_DIR/BISECT_EXPECTED_REV"
|
rm -f "$GIT_DIR/BISECT_EXPECTED_REV"
|
||||||
return
|
return
|
||||||
@ -331,7 +332,8 @@ 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; then
|
type gitk >/dev/null 2>&1
|
||||||
|
then
|
||||||
set gitk
|
set gitk
|
||||||
else
|
else
|
||||||
set git log
|
set git log
|
||||||
@ -400,7 +402,8 @@ bisect_replay () {
|
|||||||
while read git bisect command rev
|
while read git bisect command rev
|
||||||
do
|
do
|
||||||
test "$git $bisect" = "git bisect" -o "$git" = "git-bisect" || continue
|
test "$git $bisect" = "git bisect" -o "$git" = "git-bisect" || continue
|
||||||
if test "$git" = "git-bisect"; then
|
if test "$git" = "git-bisect"
|
||||||
|
then
|
||||||
rev="$command"
|
rev="$command"
|
||||||
command="$bisect"
|
command="$bisect"
|
||||||
fi
|
fi
|
||||||
@ -428,7 +431,8 @@ bisect_run () {
|
|||||||
res=$?
|
res=$?
|
||||||
|
|
||||||
# Check for really bad run error.
|
# Check for really bad run error.
|
||||||
if [ $res -lt 0 -o $res -ge 128 ]; then
|
if [ $res -lt 0 -o $res -ge 128 ]
|
||||||
|
then
|
||||||
(
|
(
|
||||||
eval_gettext "bisect run failed:
|
eval_gettext "bisect run failed:
|
||||||
exit code \$res from '\$command' is < 0 or >= 128" &&
|
exit code \$res from '\$command' is < 0 or >= 128" &&
|
||||||
@ -439,9 +443,11 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
|
|||||||
|
|
||||||
# Find current state depending on run success or failure.
|
# Find current state depending on run success or failure.
|
||||||
# A special exit code of 125 means cannot test.
|
# A special exit code of 125 means cannot test.
|
||||||
if [ $res -eq 125 ]; then
|
if [ $res -eq 125 ]
|
||||||
|
then
|
||||||
state='skip'
|
state='skip'
|
||||||
elif [ $res -gt 0 ]; then
|
elif [ $res -gt 0 ]
|
||||||
|
then
|
||||||
state='bad'
|
state='bad'
|
||||||
else
|
else
|
||||||
state='good'
|
state='good'
|
||||||
@ -454,7 +460,8 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
|
|||||||
cat "$GIT_DIR/BISECT_RUN"
|
cat "$GIT_DIR/BISECT_RUN"
|
||||||
|
|
||||||
if sane_grep "first bad commit could be any of" "$GIT_DIR/BISECT_RUN" \
|
if sane_grep "first bad commit could be any of" "$GIT_DIR/BISECT_RUN" \
|
||||||
> /dev/null; then
|
> /dev/null
|
||||||
|
then
|
||||||
(
|
(
|
||||||
gettext "bisect run cannot continue any more" &&
|
gettext "bisect run cannot continue any more" &&
|
||||||
echo
|
echo
|
||||||
@ -462,7 +469,8 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
|
|||||||
exit $res
|
exit $res
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $res -ne 0 ]; then
|
if [ $res -ne 0 ]
|
||||||
|
then
|
||||||
(
|
(
|
||||||
eval_gettext "bisect run failed:
|
eval_gettext "bisect run failed:
|
||||||
'bisect_state \$state' exited with error code \$res" &&
|
'bisect_state \$state' exited with error code \$res" &&
|
||||||
@ -471,7 +479,8 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
|
|||||||
exit $res
|
exit $res
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if sane_grep "is the first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null; then
|
if sane_grep "is the first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null
|
||||||
|
then
|
||||||
gettext "bisect run success"; echo
|
gettext "bisect run success"; echo
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user