[PATCH 2/3] git-bisect: use update-ref to mark good/bad commits
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 15, 2007, 09:01 UTC
- Message-ID
- <7vk5oj6fx2.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20071115081807.06fe092b.chriscool@tuxfamily.org>
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> --- git-bisect.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh index 3a21033..4b74a7b 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" }
-- 1.5.3.5.1780.gca2b