summaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-04-22 11:11:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-22 11:11:08 -0700
commit1fc0bfd65ac50c7c2e2a4ae263cf8ee90c106ce6 (patch)
treef0eef7d5d57330fa5a7583a16db0c08654d39fce /git-bisect.sh
parentMerge branch 'rs/archive-zip-raw-compression' (diff)
parentbisect: Store first bad commit as comment in log file (diff)
downloadtgif-1fc0bfd65ac50c7c2e2a4ae263cf8ee90c106ce6.tar.xz
Merge branch 'th/bisect-final-log'
Leave a commit to note what the final outcome was in the bisect log file. * th/bisect-final-log: bisect: Store first bad commit as comment in log file
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 99efbe8845..c58eea7cb6 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -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