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

Re: [PATCH 1/4] pack-objects: add --full-name-hash option

From
Derrick Stolee <stolee@gmail.com>
Date
Sep 10, 2024, 02:31 UTC
Message-ID
<7d7b9c30-c95a-4dcd-a5d7-1fca5ddb99e7@gmail.com>
In-Reply-To
<xmqqed5ssots.fsf@gitster.g>
On 9/9/24 1:45 PM, Junio C Hamano wrote:
Show 18 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> This is not meant to be cryptographic at all, but uniformly distributed
>> across the possible hash values. This creates a hash that appears
>> pseudorandom. There is no ability to consider similar file types as
>> being close to each other.
> 
> Another consideration we had when designing the current mechanism,
> which is more important than "compare .c files with each other", is
> to handle the case where a file is moved across directory boundary
> without changing its name.  These "hash collissions" are meant to be
> a part of obtaining _good_ paring of blobs that ought to be similar
> to each other.  In other words, we wanted them to collide so that we
> do not have to be negatively affected by moves.
> 
> I am not saying that we should not update the pack name hash; I am
> just saying that "consider similar file types" as if that is the
> most important aspect of the current hash, is misleading.

Thank you for this extra aspect, which has clarified some of my thinking and I will use in future versions.

Thanks, -Stolee

Previous: Junio C HamanoNext: Derrick Stolee via GitGitGadget
Message 4 of 38 in “pack-objects: create new name-hash algorithm”
  1. 0/4 pack-objects: create new name-hash algorithmDerrick Stolee via GitGitGadget, Sep 9, 2024
  2. 1/4 pack-objects: add --full-name-hash optionDerrick Stolee via GitGitGadget, Sep 9, 2024
  3. Junio C HamanoSep 9, 2024
  4. Derrick StoleeSep 10, 2024
  5. 2/4 git-repack: update usage to match docsDerrick Stolee via GitGitGadget, Sep 9, 2024
  6. Junio C HamanoSep 9, 2024
  7. 3/4 p5313: add size comparison testDerrick Stolee via GitGitGadget, Sep 9, 2024
  8. 4/4 p5314: add a size test for name-hash collisionsDerrick Stolee via GitGitGadget, Sep 9, 2024
  9. Derrick StoleeSep 9, 2024
  10. Junio C HamanoSep 9, 2024
  11. Derrick StoleeSep 10, 2024
  12. Taylor BlauSep 10, 2024
  13. Derrick StoleeSep 10, 2024
  14. Jeff KingSep 11, 2024
  15. Junio C HamanoSep 10, 2024
  16. Junio C HamanoSep 10, 2024
  17. Derrick StoleeSep 10, 2024
  18. 0/6 pack-objects: create new name-hash algorithmDerrick Stolee via GitGitGadget, Sep 18, 2024
  19. 1/6 pack-objects: add --full-name-hash optionDerrick Stolee via GitGitGadget, Sep 18, 2024
  20. Junio C HamanoSep 19, 2024
  21. 2/6 repack: test --full-name-hash optionDerrick Stolee via GitGitGadget, Sep 18, 2024
  22. Junio C HamanoSep 19, 2024
  23. 3/6 pack-objects: add GIT_TEST_FULL_NAME_HASHDerrick Stolee via GitGitGadget, Sep 18, 2024
  24. Junio C HamanoSep 19, 2024
  25. Derrick StoleeSep 23, 2024
  26. 4/6 git-repack: update usage to match docsDerrick Stolee via GitGitGadget, Sep 18, 2024
  27. 5/6 p5313: add size comparison testDerrick Stolee via GitGitGadget, Sep 18, 2024
  28. Junio C HamanoSep 19, 2024
  29. Derrick StoleeSep 23, 2024
  30. Junio C HamanoSep 23, 2024
  31. 6/6 test-tool: add helper for name-hash valuesDerrick Stolee via GitGitGadget, Sep 18, 2024
  32. Patrick SteinhardtSep 24, 2024
  33. Derrick StoleeSep 25, 2024
  34. Derrick StoleeSep 18, 2024
  35. Junio C HamanoOct 4, 2024
  36. Taylor BlauOct 4, 2024
  37. Jeff KingOct 4, 2024
  38. Derrick StoleeOct 8, 2024

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.