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

Hash algorithm choice

From
JBJerome Baum <jerome@jeromebaum.com>
Date
Aug 9, 2009, 16:17 UTC
Message-ID
<f448a46a0908090917s102b4c83pbad6f298a8e127cc@mail.gmail.com>
In-Reply-To
<f448a46a0908090907v68542e4dw1f1c4f610cb46ca2@mail.gmail.com>
Hi all,

I just had an idea regarding git and hashing. Couldn't find any previous discussion on the subject so here's what I'm thinking of:

How difficult would it be to allow users to choose a hash function during git-init which is then globally used in the repo? Are there many changes needed or are changes in git-hash-object and git-init sufficient?

I'm not trying to undermine the decision to use SHA-1 or anything, but I would guess it builds for the future and adds flexibility to the system. So when SHA-1 is no longer sufficient, it would be easy to switch to RIPEMD-160 with a simple "git-init --hash=ripemd160"

Would be happy for any comments on this.
Regards,
Jerome Baum
Hugo-Junkers-Str. 2
D-37083 Göttingen
Germany
Tel.: +49 551 2008782
Web: www.JeromeBaum.com
Next: Linus Torvalds
Message 1 of 8 in “Hash algorithm choice”
  1. Jerome BaumAug 9, 2009
  2. Linus TorvaldsAug 9, 2009
  3. Junio C HamanoAug 9, 2009
  4. Sverre RabbelierAug 9, 2009
  5. Linus TorvaldsAug 9, 2009
  6. Linus TorvaldsAug 9, 2009
  7. Johannes SchindelinAug 9, 2009
  8. Matthieu MoyAug 9, 2009

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.