Baruch Even wrote:
> Omer Zak wrote:
> 
>>THE QUESTION:
>>According to the above git README, objects in git are named by their
>>SHA1 hashes.  So, what happens if two objects have the same SHA1 hash,
>>unlikely as it might be?
> 
> 
> The world ends.
> 
> Well, not really, but you now have your history ruined since the new
> file will be not be stored on disk but rather disappear into the ether
> and for your next checkout you'll get the old file that was in that SHA1
> hash.
> 
> I haven't checked for a long time now but I don't think there is any
> safeguard for such a case.


The following implies there is collision detection, so the situation
might not be that bad.

commit 977b83491de92458f1b407d9b0c632b42047d40d
tree a20fa072484c03cbe46b0891c8c6ea7f3449d355
parent 0d279aa28be9afb9725681362aff47d685bc7ab2
author Pavel Roskin <[EMAIL PROTECTED]> Tue, 19 Apr 2005 12:48:18 -0400
committer Petr Baudis <[EMAIL PROTECTED]> Tue, 26 Apr 2005
22:10:56 +0200

    This patch allows to enable collision check and subsecond time
    resolution by uncommenting one line.  Also, the corresponding comments
    have been improved.

    Signed-off-by: Pavel Roskin <[EMAIL PROTECTED]>
    Signed-off-by: Petr Baudis <[EMAIL PROTECTED]>

> Baruch


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to