From: Brandon Casey Date: Fri, 22 Feb 2008 18:56:50 +0000 (-0600) Subject: git-reflog: add option --rewrite to update reflog entries while expiring X-Git-Tag: v1.5.5-rc0~56^2~8 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2b81fab2885256501d0bba6e16e516addb667bf3;p=git.git 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 --- diff --git a/builtin-reflog.c b/builtin-reflog.c index 77f70a62a..f685d76e8 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=