]> git.ipfire.org Git - thirdparty/git.git/commit - object-name.c
sha1_name: use bsearch_pack() in unique_in_pack()
authorRené Scharfe <l.s.r@web.de>
Sat, 24 Mar 2018 16:41:08 +0000 (17:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 25 Mar 2018 16:18:15 +0000 (09:18 -0700)
commit902f5a2119089472c905407cb0a9b3886d032ebd
tree367740a5259e9ffe5bfd32f2eaea06f31688a6d1
parent0aaf05b3bdc1ce48bed9f8dcba54153a2b7cdc09
sha1_name: use bsearch_pack() in unique_in_pack()

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 <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c