git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: martin f krafft <madduck@madduck.net>
Cc: git discussion list <git@vger.kernel.org>
Subject: Re: Git commit hash clash prevention
Date: Thu, 02 Oct 2008 07:00:18 -0700 (PDT)	[thread overview]
Message-ID: <m3prmjqeq8.fsf@localhost.localdomain> (raw)
In-Reply-To: <20081002085358.GA5342@lapse.rw.madduck.net>

martin f krafft <madduck@madduck.net> writes:

> 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

  parent reply	other threads:[~2008-10-02 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02  8:53 Git commit hash clash prevention martin f krafft
2008-10-02  9:18 ` Thomas Rast
2008-10-02 11:08   ` Jean-Luc Herren
2008-10-02 10:07 ` Johannes Schindelin
2008-10-02 14:00 ` Jakub Narebski [this message]
2008-10-02 15:39   ` Johannes Schindelin
2008-10-02 16:04 ` Stephan Beyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3prmjqeq8.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=madduck@madduck.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).