git-reflog: add option --updateref to write the last reflog sha1 into the ref
authorBrandon Casey <casey@nrlssc.navy.mil>
Fri, 22 Feb 2008 19:04:12 +0000 (13:04 -0600)
committerJunio C Hamano <gitster@pobox.com>
Sat, 23 Feb 2008 06:57:38 +0000 (22:57 -0800)
commit55f105653715356fe0b2392445a6f394b891402c
tree78a6820fbaf3eb82d3d04f58862abdfa08366e4e
parent435fc8523fd3a625acfeebffe433f1f7516ab9e2
git-reflog: add option --updateref to write the last reflog sha1 into the ref

Certain sanity checks on the reflog assume that the sha1 of the top reflog
entry will be equal to the sha1 stored in the ref.

When reflog entries are deleted, this assumption may not hold. This patch
adds a new option to git-reflog which causes the subcommands "expire" and
"delete" to update the ref with the sha1 of the top-most reflog entry.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-reflog.c