From f989cac9581ee423457c02f67d6bf31348ae6b56 Mon Sep 17 00:00:00 2001 From: Torstein Hegge Date: Mon, 22 Apr 2013 23:02:29 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- git-bisect.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'git-bisect.sh') 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 -- cgit v1.2.1