Thread (1 message) 1 message, 1 author, 2024-09-19

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

From: Junio C Hamano <hidden>
Date: 2024-09-19 21:56:11

"Derrick Stolee via GitGitGadget" [off-list ref] writes:
+static inline uint32_t pack_full_name_hash(const char *name)
+{
+	const uint32_t bigp = 1234572167U;
+	uint32_t c, hash = bigp;
+
+	if (!name)
+		return 0;
+
+	/*
+	 * Do the simplest thing that will resemble pseduo-randomness: add
"pseduo" -> "pseudo"
+	 * random multiples of a large prime number with a binary shift.
+	 * The goal is not to be cryptographic, but to be generally
+	 * uniformly distributed.
+	 */
Other than that, there is no substantial difference since the
previous iteration; this step looks good.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help