From 55f105653715356fe0b2392445a6f394b891402c Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 22 Feb 2008 13:04:12 -0600 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- builtin-reflog.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/builtin-reflog.c b/builtin-reflog.c index f685d76e8..280e24e15 100644 --- a/builtin-reflog.c +++ b/builtin-reflog.c @@ -15,7 +15,7 @@ static const char reflog_expire_usage[] = "git-reflog (show|expire) [--verbose] [--dry-run] [--stale-fix] [--expire=