OSDN Git Service

bisect: Fix log output for multi-parent skip ranges
authorTorstein Hegge <hegge@resisty.net>
Wed, 22 May 2013 22:27:53 +0000 (00:27 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 May 2013 22:40:43 +0000 (15:40 -0700)
The bisect log output of skipped commits introduced in f989cac "bisect:
Log possibly bad, skipped commits at bisection end" should obtain the range of
skipped commits from

    git rev-list bad --not good-1 good-2

not

    git rev-list bad --not good-1 --not good-2

when the skipped range contains a merge with good points in each parent.

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-bisect.sh

index d7518e9..9f064b6 100755 (executable)
@@ -320,8 +320,8 @@ bisect_next() {
        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)
+               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"