summaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-09-30 15:08:10 +0100
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-09-30 15:08:10 +0100
commit43efcf42382e87de4aa423e5e1607958ad1717d0 (patch)
tree7e19a0765b0dd6885fbdf69d3a8d0159a1b42de8 /git-bisect.sh
parent45d74c4b0fe38218b4569a90da7102cf48d616c2 (diff)
parentc7fd06b6411fb04eb4d9acd7f8822a288a50dc17 (diff)
downloadgit-43efcf42382e87de4aa423e5e1607958ad1717d0.tar.gz
Merge branch 'baserock/jonathanmaw/S9007/upgrade-git' into baserock/morphbaserock/morph
Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk> Reviewed-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 99efbe8845..9f064b6f4f 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -311,7 +311,23 @@ bisect_next() {
res=$?
# Check if we should exit because bisection is finished
- test $res -eq 10 && exit 0
+ if test $res -eq 10
+ then
+ bad_rev=$(git show-ref --hash --verify refs/bisect/bad)
+ bad_commit=$(git show-branch $bad_rev)
+ echo "# first bad commit: $bad_commit" >>"$GIT_DIR/BISECT_LOG"
+ exit 0
+ elif test $res -eq 2
+ then
+ echo "# only skipped commits left to test" >>"$GIT_DIR/BISECT_LOG"
+ good_revs=$(git for-each-ref --format="%(objectname)" "refs/bisect/good-*")
+ for skipped in $(git rev-list refs/bisect/bad --not $good_revs)
+ do
+ skipped_commit=$(git show-branch $skipped)
+ echo "# possible first bad commit: $skipped_commit" >>"$GIT_DIR/BISECT_LOG"
+ done
+ exit $res
+ fi
# Check for an error in the bisection process
test $res -ne 0 && exit $res