From: Junio C Hamano Date: Thu, 15 Nov 2007 08:42:04 +0000 (-0800) Subject: git-bisect: use update-ref to mark good/bad commits X-Git-Tag: v1.5.4-rc0~156^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3d7cd64cb493e3e30e4398c7b6cd66ee38cb4418;p=git.git git-bisect: use update-ref to mark good/bad commits This removes the last instance of making a ref by hand with "echo SHA1 >.git/refs/$refname" from the script and replaces it with update-ref. Signed-off-by: Junio C Hamano --- diff --git a/git-bisect.sh b/git-bisect.sh index 3a210335e..4b74a7bb4 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -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" }