From: René Scharfe Date: Sun, 25 Mar 2018 16:32:03 GMT Subject: Re: [PATCH 4/3] sha1_name: use bsearch_pack() in unique_in_pack() Message-ID: In-Reply-To: Am 25.03.2018 um 18:19 schrieb Junio C Hamano: > René Scharfe writes: > >> Replace the custom binary search in unique_in_pack() with a call to >> bsearch_pack(). This reduces code duplication and makes use of the >> fan-out table of packs. >> >> Signed-off-by: Rene Scharfe >> --- >> This is basically the same replacement as done by patch 3. Speed is >> less of a concern here -- at least I don't know a commonly used >> command that needs to resolve lots of short hashes. > > Looks correct. Did you find this by eyeballing, or do you have some > interesting tool you use? I was looking for SHA1 binary searches using something like this: git grep -e '/ 2' -e hashcmp -W --all-match René