Re: RFC: reflog for deleted branches
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 3, 2012, 21:37 UTC
- Message-ID
- <7vaa1pdjz8.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4FA2F7DA.6020108@tu-clausthal.de>
Sven Strickroth <sven.strickroth@tu-clausthal.de> writes:
Show 8 quoted lines
> an often heart question is how to restore deleted branches. Sometimes > those can be restored by using the reflog of the HEAD. > > But why not create a special (ref)log for deleted branches (with SHA1, > date, name of the branch and maybe commit message of the last commit on > the deleted branch)? This way people could just look up the SHA1 of the > deleted branch and can recreate it (even if they moved the HEAD around a > lot).
The itch is legit, but I doubt a "special log for deleted branches" is a good design. Why do you limit yourself only to a single "last" commit? Wouldn't it be a better design to save away the entire reflog for the branch when a branch is deleted, possibly with expedited expire rule for such a reflog?