Skip to content

Commit

Permalink
fixup! pack-objects: add --full-name-hash option
Browse files Browse the repository at this point in the history
Update to the latest iteration of gitgitgadget#1785.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 24, 2024
1 parent 02d577f commit 2ff44f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pack-objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2ff44f2

Please sign in to comment.