Re: Git commit hash clash prevention
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Oct 2, 2008, 14:00 UTC
- Message-ID
- <m3prmjqeq8.fsf@localhost.localdomain>
- In-Reply-To
- <20081002085358.GA5342@lapse.rw.madduck.net>
martin f krafft <madduck@madduck.net> writes:
Show 10 quoted lines
> the other day during a workshop on Git, one of the attendants asked > about the scenario when two developers, Jane and David, both working > on the same project, both create a commit and the two just so happen > to have the same SHA-1. I realise that the likelihood of this > happening is about as high as the chance of <insert witty joke > here>, but it *is* possible, isn't it? Even though this is thus > somewhat academic, I am still very curious about it. > > What happens when David now pulls from Jane? How does Git deal with > this?
Cannot happen in practice.
But just in case git trusts object it already has in repository over object which just got fetched (or pushed).
-- Jakub Narebski Poland ShadeHawk on #git