Re: [PATCH] refs: do not use cached refs in repack_without_ref

2013-01-07 Thread Martin Fick
...[Sorry about the previous HTML reposts] Jeff King p...@peff.net wrote: On Mon, Dec 31, 2012 at 03:30:53AM -0700, Martin Fick wrote: The general approach is to setup a transaction and either commit or abort it. A transaction can be setup by renaming an appropriately setup directory to the

Re: [PATCH] refs: do not use cached refs in repack_without_ref

2012-12-28 Thread Jeff King
On Wed, Dec 26, 2012 at 09:24:39AM +0100, Michael Haggerty wrote: I'm sorry to take so long to respond to this patch. Thank you for tracking down this bug and for your careful analysis. I think your patch is correct and should fix the first race condition that you described. Thanks for

Re: [PATCH] refs: do not use cached refs in repack_without_ref

2012-12-26 Thread Michael Haggerty
On 12/21/2012 09:04 AM, Jeff King wrote: When we delete a ref that is packed, we rewrite the whole packed-refs file and simply omit the ref that no longer exists. However, we base the rewrite on whatever happens to be in our refs cache, not what is necessarily on disk. That opens us up to a