Skip to content

Commit

Permalink
bisect: replace "; then" with "\n<tab>*then"
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jon Seymour authored and Junio C Hamano committed Aug 5, 2011
1 parent 6021be8 commit eef12a9
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions git-bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ is_expected_rev() {

check_expected_revs() {
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_EXPECTED_REV"
return
Expand Down Expand Up @@ -331,7 +332,8 @@ bisect_visualize() {
if test $# = 0
then
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
else
set git log
Expand Down Expand Up @@ -400,7 +402,8 @@ bisect_replay () {
while read git bisect command rev
do
test "$git $bisect" = "git bisect" -o "$git" = "git-bisect" || continue
if test "$git" = "git-bisect"; then
if test "$git" = "git-bisect"
then
rev="$command"
command="$bisect"
fi
Expand Down Expand Up @@ -428,7 +431,8 @@ bisect_run () {
res=$?

# 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:
exit code \$res from '\$command' is < 0 or >= 128" &&
Expand All @@ -439,9 +443,11 @@ exit code \$res from '\$command' is < 0 or >= 128" &&

# Find current state depending on run success or failure.
# A special exit code of 125 means cannot test.
if [ $res -eq 125 ]; then
if [ $res -eq 125 ]
then
state='skip'
elif [ $res -gt 0 ]; then
elif [ $res -gt 0 ]
then
state='bad'
else
state='good'
Expand All @@ -454,15 +460,17 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
cat "$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" &&
echo
) >&2
exit $res
fi

if [ $res -ne 0 ]; then
if [ $res -ne 0 ]
then
(
eval_gettext "bisect run failed:
'bisect_state \$state' exited with error code \$res" &&
Expand All @@ -471,7 +479,8 @@ exit code \$res from '\$command' is < 0 or >= 128" &&
exit $res
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
exit 0;
fi
Expand Down

0 comments on commit eef12a9

Please sign in to comment.