aboutsummaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2007-10-26 05:39:37 +0200
committerJunio C Hamano <gitster@pobox.com>2007-10-26 23:27:24 -0700
commit71b0251cdd2cc35a983e21d4e71285db56d2a519 (patch)
tree252b50aa23c9558335a261c43a04edc3e0ecc8f5 /git-bisect.sh
parent37f9fd0dde454db08d342e5ce7625e012507bb9b (diff)
downloadgit-71b0251cdd2cc35a983e21d4e71285db56d2a519.tar.gz
git-71b0251cdd2cc35a983e21d4e71285db56d2a519.tar.xz
Bisect run: "skip" current commit if script exit code is 125.
This is incompatible with previous versions because an exit code of 125 used to mark current commit as "bad". But hopefully this exit code is not much used by test scripts or other programs. (126 and 127 are used by POSIX compliant shells to mean "found but not executable" and "command not found", respectively.) Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index f8d009905..180c6c280 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -392,7 +392,10 @@ bisect_run () {
fi
# Find current state depending on run success or failure.
- if [ $res -gt 0 ]; then
+ # A special exit code of 125 means cannot test.
+ if [ $res -eq 125 ]; then
+ state='skip'
+ elif [ $res -gt 0 ]; then
state='bad'
else
state='good'
@@ -404,6 +407,12 @@ bisect_run () {
cat "$GIT_DIR/BISECT_RUN"
+ if grep "first bad commit could be any of" "$GIT_DIR/BISECT_RUN" \
+ > /dev/null; then
+ echo >&2 "bisect run cannot continue any more"
+ exit $res
+ fi
+
if [ $res -ne 0 ]; then
echo >&2 "bisect run failed:"
echo >&2 "'bisect_state $state' exited with error code $res"