Subject: Re: [PATCH] repack.c: rename and unlink pack file if it exists

From: Torsten Bögershausen <[email-masked]>
Date: Wed, 05 Feb 2014 18:54:56 +0100

On 2014-02-05 02.16, Jeff King wrote:
> On Tue, Feb 04, 2014 at 03:40:15PM -0800, Junio C Hamano wrote:
> 
>>  * Somehow this came to my private mailbox without Cc to list, so I
>>    am forwarding it.
>>
>>    I think with 1190a1ac (pack-objects: name pack files after
>>    trailer hash, 2013-12-05), repacking the same set of objects may
>>    have less chance of producing colliding names, especially if you
>>    are on a box with more than one core, but it still would be a
>>    good idea to get this part right in the upcoming release.
> 
> Actually, since 1190a1ac, if you have repacked and gotten the same pack
> name, then you do not have to do any rename dance at all; you can throw
> away what you just generated because you know that it is byte-for-byte
> identical.
> 
> You could collide with a pack created by an older version of git that
> used the original scheme, but that is quite unlikely (on the order of
> 2^-160).
> 
> -Peff
OK, I messed up the email so it went only to Junios mailbox. Sorry for confusion.

Jochen, it could be good if you could test this version of the patch
(I couldn't reproduce the problem here)

/Torsten