Code

git-bisect: use update-ref to mark good/bad commits
[git.git] / git-bisect.sh
index 3a210335e7e2bdcaebf561b23374a32bec2faffd..4b74a7bb421e35627bf749316027707237210e7a 100755 (executable)
@@ -130,7 +130,7 @@ bisect_write() {
                good|skip)      tag="$state"-"$rev" ;;
                *)              die "Bad bisect_write argument: $state" ;;
        esac
-       echo "$rev" >"$GIT_DIR/refs/bisect/$tag"
+       git update-ref "refs/bisect/$tag" "$rev"
        echo "# $state: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
        test -z "$nolog" && echo "git-bisect $state $rev" >>"$GIT_DIR/BISECT_LOG"
 }