summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6021be8)
raw | patch | inline | side by side (parent: 6021be8)
author | Jon Seymour <jon.seymour@gmail.com> | |
Fri, 5 Aug 2011 11:31:31 +0000 (21:31 +1000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 5 Aug 2011 17:04:44 +0000 (10:04 -0700) |
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 f5d9ede9dde988f7b2ce9dc89c1f86d74c30664c..1f3c46da83b61b3b8a7fce5084206d32596604f0 100755 (executable)
--- a/git-bisect.sh
+++ b/git-bisect.sh
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
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
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
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" &&
# 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'
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
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" &&
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