Merge branch 'kb/status-ignored-optim-2'
[gitweb.git] / git-bisect.sh
index 99efbe884528ffa730d6c0297e20d9de93d5ad9e..c58eea7cb6b34d69e812d2bac8f514272f679beb 100755 (executable)
@@ -311,7 +311,13 @@ 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
+       fi
 
        # Check for an error in the bisection process
        test $res -ne 0 && exit $res