From: Shawn O. Pearce Date: Tue, 07 Dec 2010 18:37:39 GMT Subject: Re: [PATCH] logging branch deletion to help recovering from mistakes Message-ID: <20101207183739.GB3725@spearce.org> In-Reply-To: <20101207183507.GA27277@sigill.intra.peff.net> Jeff King wrote: > On Tue, Dec 07, 2010 at 10:23:42AM -0800, Shawn O. Pearce wrote: > > > Yea, I'm leaning more towards the foo..deleted-n idea too, for the > > same reasons. It also makes it easier to GC a deleted branch's > > reflog, we can examine the last record's timestamp in a reasonable > > time bound and unlink the log if its really freaking old. > > Do we need to actually do that? Shouldn't the entries in the reflog get > expired as part of the regular reflog gc? In that case, we would just > delete the file when it had zero entries. Yes, you are right. We should instead let the normal reflog expire action do its work here, and delete the empty log file when it is finally empty. I guess we also need repack and prune to enumerate these deleted reflogs and retain the objects their records point to. -- Shawn.