]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-bisect.sh
Bisect: convert revs given to good and bad to commits
[thirdparty/git.git] / git-bisect.sh
index b1c3a6b1c1af9815db473595f4eb3e9593425f10..dbce0dfec93e41f6c1246ce7648ca1c40aeef5b0 100755 (executable)
@@ -85,7 +85,7 @@ bisect_bad() {
        0)
                rev=$(git-rev-parse --verify HEAD) ;;
        1)
-               rev=$(git-rev-parse --verify "$1") ;;
+               rev=$(git-rev-parse --verify "$1^{commit}") ;;
        *)
                usage ;;
        esac || exit
@@ -104,7 +104,7 @@ bisect_good() {
        esac
        for rev in $revs
        do
-               rev=$(git-rev-parse --verify "$rev") || exit
+               rev=$(git-rev-parse --verify "$rev^{commit}") || exit
                echo "$rev" >"$GIT_DIR/refs/bisect/good-$rev"
                echo "# good: "$(git-show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
                echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"