Skip to content

Commit

Permalink
git-bisect: use update-ref to mark good/bad commits
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Nov 16, 2007
1 parent e23cb8c commit 3d7cd64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 3d7cd64

Please sign in to comment.