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

Re: [PATCH 2/3] commit-graph: use the hash version byte

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2020, 20:22 UTC
Message-ID
<xmqqy2mhuge2.fsf@gitster.c.googlers.com>
In-Reply-To
<20200814201153.GK8085@camp.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 13 quoted lines
> Can we maybe say something like this?
>
>   switch (hash_algo_by_ptr(the_hash_algo)) {
>     case GIT_HASH_SHA1:
>       return 1;
>     case GIT_HASH_SHA256:
>       return 2;
>     default:
>       die(_("invalid hash version"));
>   }
>
> That way if SHA-256 gets broken and we switch to another 256-bit hash
> (SHA-3-256?), we'll be forced to update this properly.
Excellent.
Previous: brian m. carlsonNext: Derrick Stolee
Message 10 of 22 in “SHA-256: Update commit-graph and multi-pack-index formats”
  1. 0/3 SHA-256: Update commit-graph and multi-pack-index formatsDerrick Stolee via GitGitGadget, Aug 14, 2020
  2. 1/3 t/README: document GIT_TEST_DEFAULT_HASHDerrick Stolee via GitGitGadget, Aug 14, 2020
  3. Junio C HamanoAug 14, 2020
  4. Eric SunshineAug 14, 2020
  5. Derrick StoleeAug 14, 2020
  6. 2/3 commit-graph: use the hash version byteDerrick Stolee via GitGitGadget, Aug 14, 2020
  7. Junio C HamanoAug 14, 2020
  8. Taylor BlauAug 14, 2020
  9. brian m. carlsonAug 14, 2020
  10. Junio C HamanoAug 14, 2020
  11. Derrick StoleeAug 14, 2020
  12. Martin ÅgrenAug 15, 2020
  13. 3/3 multi-pack-index: use hash version byteDerrick Stolee via GitGitGadget, Aug 14, 2020
  14. brian m. carlsonAug 14, 2020
  15. Junio C HamanoAug 14, 2020
  16. Derrick StoleeAug 14, 2020
  17. Junio C HamanoAug 14, 2020
  18. 0/3 SHA-256: Update commit-graph and multi-pack-index formatsDerrick Stolee via GitGitGadget, Aug 17, 2020
  19. 1/3 t/README: document GIT_TEST_DEFAULT_HASHDerrick Stolee via GitGitGadget, Aug 17, 2020
  20. 2/3 commit-graph: use the "hash version" byteDerrick Stolee via GitGitGadget, Aug 17, 2020
  21. 3/3 multi-pack-index: use hash version byteDerrick Stolee via GitGitGadget, Aug 17, 2020
  22. brian m. carlsonAug 17, 2020

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.