From: Junio C Hamano Date: Tue, 07 Dec 2010 19:21:46 GMT Subject: Re: [PATCH] logging branch deletion to help recovering from mistakes Message-ID: <7v7hflqth1.fsf@alter.siamese.dyndns.org> In-Reply-To: <20101207170623.GB21749@sigill.intra.peff.net> Jeff King writes: > On Mon, Dec 06, 2010 at 10:28:53PM -0800, Junio C Hamano wrote: > > Yeah, I think this is not _quite_ what people want in this area. A base > requirement from past discussions, I think, is that the whole reflog of > the deleted branch be saved rather than just the tip. And then "reflog > show" would make a lot more sense on such saved reflogs. I am more worried about stuff in branch..* that are discarded upon "branch -d". Without the config items, you won't have a working: $ branch -d frotz $ branch --undelete frotz $ git checkout frotz $ git pull I would say it is fine to discard old reflog for "frotz" branch and tell users of --undelete that even though their branch is undeleted, the reflog for it is already expired when they deleted it the first time, but it is impossible to implement "branch --undelete" without stashing away stuff other than reflog.