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

easy way to demonstrate length of colliding SHA-1 prefixes?

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Dec 2, 2018, 11:50 UTC
Message-ID
<alpine.LFD.2.21.1812020647440.32023@localhost.localdomain>
  as part of an upcoming git class i'm delivering, i thought it would
be amusing to demonstrate the maximum length of colliding SHA-1
prefixes in a repository (in my case, i use the linux kernel git repo
for most of my examples).
  is there a way to display the objects in the object database that
clash in the longest object name SHA-1 prefix; i mean, short of
manually listing all object names, running that through cut and sort
and uniq and ... you get the idea.
  is there a cute way to do that? thanks.
rday
Next: Ævar Arnfjörð Bjarmason
Message 1 of 5 in “easy way to demonstrate length of colliding SHA-1 prefixes?”
  1. Robert P. J. DayDec 2, 2018
  2. Ævar Arnfjörð BjarmasonDec 2, 2018
  3. Robert P. J. DayDec 2, 2018
  4. Matthew DeVoreDec 3, 2018
  5. Jeff KingDec 3, 2018

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.