From: Jeff King Date: Wed, 12 Jun 2013 11:38:24 GMT Subject: Re: [PATCH 01/12] repack_without_ref(): split list curation and entry writing Message-ID: <20130612113823.GA20461@sigill.intra.peff.net> In-Reply-To: <1370987312-6761-2-git-send-email-mhagger@alum.mit.edu> On Tue, Jun 11, 2013 at 11:48:21PM +0200, Michael Haggerty wrote: > Split repack_without_ref() into multiple passes: > > * collect the list of refnames that should be deleted from packed_refs > > * delete those refnames from the cache > > * write the remainder to the packed-refs file > > The purpose of this change is to make the "write the remainder" part > reusable. It took me several reads to figure out what was going on here, because I did not see the deleted ref passed to the list of items to delete from packed_refs. The part I was missing is something like: The repack_without_ref() function first removes the deleted ref from the internal packed-refs list, then writes the packed-refs list to disk, omitting any broken or stale entries. This patch splits that second step into multiple passes: ... Is that accurate? -Peff