From: martin f krafft <madduck@madduck.net>
To: git discussion list <git@vger.kernel.org>
Subject: Git commit hash clash prevention
Date: Thu, 2 Oct 2008 10:53:58 +0200 [thread overview]
Message-ID: <20081002085358.GA5342@lapse.rw.madduck.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 985 bytes --]
Hi folks,
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?
I imagine it'll be able to distinguish the two commits based on
metadata, but won't the DAG get corrupted?
Cheers,
--
martin | http://madduck.net/ | http://two.sentenc.es/
"and no one sings me lullabies,
and no one makes me close my eyes,
and so i throw the windows wide,
and call to you across the sky"
-- pink floyd, 1971
spamtraps: madduck.bogus@madduck.net
[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2008-10-02 8:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-02 8:53 martin f krafft [this message]
2008-10-02 9:18 ` Git commit hash clash prevention Thomas Rast
2008-10-02 11:08 ` Jean-Luc Herren
2008-10-02 10:07 ` Johannes Schindelin
2008-10-02 14:00 ` Jakub Narebski
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=20081002085358.GA5342@lapse.rw.madduck.net \
--to=madduck@madduck.net \
--cc=git@vger.kernel.org \
/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).