git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git behaviour question regarding SHA-1 and commits

From
Jeff King <peff@peff.net>
Date
Nov 14, 2011, 11:32 UTC
Message-ID
<20111114113235.GE10847@sigill.intra.peff.net>
In-Reply-To
<20111113182757.GA15194@elie.hsd1.il.comcast.net>
On Sun, Nov 13, 2011 at 12:27:57PM -0600, Jonathan Nieder wrote:
> Though I haven't tested.  It would be nice to have an md5git (or even
> truncated-sha1-git) program to test this kind of thing with.
Fortunately we have such a thing:
  http://article.gmane.org/gmane.comp.version-control.git/184243

That one actually has 40 bits of hash entropy, so you'd expect to generate 2^20 (about a million) commits before accidentally colliding. If you want an easier experiment, you could truncate it even further.

-Peff
Previous: vinassa vinassaNext: Victor Engmark
Message 7 of 11 in “git behaviour question regarding SHA-1 and commits”
  1. vinassa vinassaNov 13, 2011
  2. Ævar Arnfjörð BjarmasonNov 13, 2011
  3. Junio C HamanoNov 14, 2011
  4. Jeff KingNov 14, 2011
  5. Jonathan NiederNov 13, 2011
  6. vinassa vinassaNov 13, 2011
  7. Jeff KingNov 14, 2011
  8. Victor EngmarkNov 14, 2011
  9. Jeff KingNov 14, 2011
  10. Dmitry PotapovNov 13, 2011
  11. Johannes SixtNov 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.