Commit Diff
Diff:
b9efd927c001e0ea11fac039d1d0849bcad14cab
cd9ef01a441e0ecfd499bf907c15a2878f7e0ee2
Commit:
cd9ef01a441e0ecfd499bf907c15a2878f7e0ee2
Tree:
bd729d154db0e22912964f6524bf669d689394ed
Author:
Omar Polo <op@omarpolo.com>
Date:
Wed Aug 3 07:08:26 2022 UTC
Message:
reuse diff_atom_hash_update

ok stsp@
commit - b9efd927c001e0ea11fac039d1d0849bcad14cab
commit + cd9ef01a441e0ecfd499bf907c15a2878f7e0ee2
blob - 79d9633bdaa73ce679a74c04294b35271c5374f7
blob + dd6b2aa9dd850690d77fb00149d2331f76b827e3
--- lib/diff_atomize_text.c
+++ lib/diff_atomize_text.c
@@ -143,7 +143,7 @@ diff_data_atomize_text_lines_mmap(struct diff_data *d)
while (line_end < end && *line_end != '\r' && *line_end != '\n') {
if (!ignore_whitespace
|| !isspace(*line_end))
- hash = hash * 23 + *line_end;
+ hash = diff_atom_hash_update(hash, *line_end);
if (*line_end == '\0')
embedded_nul = true;
line_end++;
Omar Polo