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 <gitster@pobox.com>
Junio C Hamano committed
Nov 15, 2007 at 00:42 UTC
3d7cd64cb493e3e30e4398c7b6cd66ee38cb4418
1 file changed
+1
-1
git-bisect.sh
+1
-1
@@ -130,7 +130,7 @@ bisect_write() {
130
good|skip) tag="$state"-"$rev" ;;
131
*) die "Bad bisect_write argument: $state" ;;
132
esac
133
- echo "$rev" >"$GIT_DIR/refs/bisect/$tag"
133
+ git update-ref "refs/bisect/$tag" "$rev"
134
echo "# $state: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
135
test -z "$nolog" && echo "git-bisect $state $rev" >>"$GIT_DIR/BISECT_LOG"
136
}