summaryrefslogtreecommitdiffstats
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorTorstein Hegge <hegge@resisty.net>2013-04-22 23:02:29 +0200
committerJunio C Hamano <gitster@pobox.com>2013-04-23 09:09:44 -0700
commitf989cac9581ee423457c02f67d6bf31348ae6b56 (patch)
tree1ccc60f48d01efa42d02907007d19e635a59b113 /git-bisect.sh
parent118f60ee06612083ff4f1810424e80a3e896f73e (diff)
downloadgit-f989cac9581ee423457c02f67d6bf31348ae6b56.tar.gz
git-f989cac9581ee423457c02f67d6bf31348ae6b56.tar.xz
bisect: Log possibly bad, skipped commits at bisection end
If the bisection completes with only skipped commits left to as possible first bad commit, output the list of possible first bad commits to human readers of the bisection log. Signed-off-by: Torstein Hegge <hegge@resisty.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index c58eea7cb..d7518e9c3 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -317,6 +317,16 @@ bisect_next() {
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="--not %(objectname)" "refs/bisect/good-*")
+ for skipped in $(git rev-list refs/bisect/bad $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