From 2b81fab2885256501d0bba6e16e516addb667bf3 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 22 Feb 2008 12:56:50 -0600 Subject: [PATCH] git-reflog: add option --rewrite to update reflog entries while expiring Certain sanity checks on the reflog assume that each entry will contain a reference to the previous entry. i.e. that the "old" sha1 field of a reflog entry will be equal to the "new" sha1 field of the previous entry. 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 rewrite the "old" sha1 field of each reflog entry so that it points to the previous reflog entry. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- builtin-reflog.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/builtin-reflog.c b/builtin-reflog.c index 77f70a62ab..f685d76e8d 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=