News for hackers. Stuff that matters.
Re:Shrunked JavaScript monorepo Git size by 94% by js2 on Sunday October 27, 2024 @04:03PM (#41965217)
> file name does not include its full path

No, it is the full path that's considered. Look at the commit message on the first commit in the `--full-name-hash` PR:

https://github.com/git-for-windows/git/pull/5157/commits/d5c...

Excerpt: "/CHANGELOG.json" is 15 characters, and is created by the beachball [1] tool. Only the final character of the parent directory can differntiate different versions of this file, but also only the two most-significant digits. If that character is a letter, then this is always a collision. Similar issues occur with the similar "/CHANGELOG.md" path, though there is more opportunity for differences in the parent directory.

Re:Shrunked JavaScript monorepo Git size by 94% by eviks on Monday October 28, 2024 @01:56AM (#41968160)
Thanks for the deep dive!
Re:Shrunked JavaScript monorepo Git size by 94% by rurban on Monday October 28, 2024 @03:46PM (#41975343)
Sounds like it needs to be fixed to FNV1a
Re:Shrunked JavaScript monorepo Git size by 94% by js2 on Tuesday October 29, 2024 @12:59PM (#41986557)
No, the problem isn't the hash. It does what it was designed to do. It's just that it was optimal for a particular use case that fits the Linux kernel better than Microsoft's use case. Switching the hash wouldn't improve either situation. If you want to understand this deeper, see the linked PRs.