mirror of
https://github.com/git-for-windows/git.git
synced 2026-02-04 21:42:59 -06:00
fixup! pack-objects: add --full-name-hash option
Update to the latest iteration of https://github.com/gitgitgadget/git/pull/1785. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
02d577fd7b
commit
2ff44f2c64
@ -216,9 +216,10 @@ static inline uint32_t pack_full_name_hash(const char *name)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Just do the dumbest thing possible: add random multiples of a
|
||||
* large prime number with a binary shift. Goal is not cryptographic,
|
||||
* but generally uniformly distributed.
|
||||
* Do the simplest thing that will resemble pseudo-randomness: add
|
||||
* random multiples of a large prime number with a binary shift.
|
||||
* The goal is not to be cryptographic, but to be generally
|
||||
* uniformly distributed.
|
||||
*/
|
||||
while ((c = *name++) != 0) {
|
||||
hash += c * bigp;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user