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>

Jon Seymour committed Aug 5, 2011 at 21:31 UTC eef12a9a7782bfe12f1ef870aa73143622be2ac1
1 file changed +18 -9
git-bisect.sh
+18 -9
@@ -198,7 +198,8 @@ is_expected_rev() {
198
199 check_expected_revs() {
200 for _rev in "$@"; do
201 - if ! is_expected_rev "$_rev"; then
201 + if ! is_expected_rev "$_rev"
202 + then
203 rm -f "$GIT_DIR/BISECT_ANCESTORS_OK"
204 rm -f "$GIT_DIR/BISECT_EXPECTED_REV"
205 return
@@ -331,7 +332,8 @@ bisect_visualize() {
332 if test $# = 0
333 then
334 if test -n "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" &&
334 - type gitk >/dev/null 2>&1; then
335 + type gitk >/dev/null 2>&1
336 + then
337 set gitk
338 else
339 set git log
@@ -400,7 +402,8 @@ bisect_replay () {
402 while read git bisect command rev
403 do
404 test "$git $bisect" = "git bisect" -o "$git" = "git-bisect" || continue
403 - if test "$git" = "git-bisect"; then
405 + if test "$git" = "git-bisect"
406 + then
407 rev="$command"
408 command="$bisect"
409 fi
@@ -428,7 +431,8 @@ bisect_run () {
431 res=$?
432
433 # Check for really bad run error.
431 - if [ $res -lt 0 -o $res -ge 128 ]; then
434 + if [ $res -lt 0 -o $res -ge 128 ]
435 + then
436 (
437 eval_gettext "bisect run failed:
438 exit code \$res from '\$command' is < 0 or >= 128" &&
@@ -439,9 +443,11 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
443
444 # Find current state depending on run success or failure.
445 # A special exit code of 125 means cannot test.
442 - if [ $res -eq 125 ]; then
446 + if [ $res -eq 125 ]
447 + then
448 state='skip'
444 - elif [ $res -gt 0 ]; then
449 + elif [ $res -gt 0 ]
450 + then
451 state='bad'
452 else
453 state='good'
@@ -454,7 +460,8 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
460 cat "$GIT_DIR/BISECT_RUN"
461
462 if sane_grep "first bad commit could be any of" "$GIT_DIR/BISECT_RUN" \
457 - > /dev/null; then
463 + > /dev/null
464 + then
465 (
466 gettext "bisect run cannot continue any more" &&
467 echo
@@ -462,7 +469,8 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
469 exit $res
470 fi
471
465 - if [ $res -ne 0 ]; then
472 + if [ $res -ne 0 ]
473 + then
474 (
475 eval_gettext "bisect run failed:
476 'bisect_state \$state' exited with error code \$res" &&
@@ -471,7 +479,8 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
479 exit $res
480 fi
481
474 - if sane_grep "is the first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null; then
482 + if sane_grep "is the first bad commit" "$GIT_DIR/BISECT_RUN" > /dev/null
483 + then
484 gettext "bisect run success"; echo
485 exit 0;
486 fi