]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/drop-sha1-entry-pos' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 18 Oct 2017 05:19:06 +0000 (14:19 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Oct 2017 05:19:06 +0000 (14:19 +0900)
Code clean-up.

* jk/drop-sha1-entry-pos:
  sha1-lookup: remove sha1_entry_pos() from header file
  sha1_file: drop experimental GIT_USE_LOOKUP search

1  2 
sha1_file.c
t/test-lib.sh

diff --cc sha1_file.c
index 4fa4b185f312d903929ed8c601c9ae04026bce59,85c28bdbddb317d606b07e5ccb00d9e74312b75d..9008d6aa7bb59944d97f8ed73d9772d9ab529187
@@@ -2791,17 -2695,7 +2790,7 @@@ off_t find_pack_entry_one(const unsigne
                printf("%02x%02x%02x... lo %u hi %u nr %"PRIu32"\n",
                       sha1[0], sha1[1], sha1[2], lo, hi, p->num_objects);
  
-       if (use_lookup < 0)
-               use_lookup = !!getenv("GIT_USE_LOOKUP");
-       if (use_lookup) {
-               int pos = sha1_entry_pos(index, stride, 0,
-                                        lo, hi, p->num_objects, sha1);
-               if (pos < 0)
-                       return 0;
-               return nth_packed_object_offset(p, pos);
-       }
 -      do {
 +      while (lo < hi) {
                unsigned mi = (lo + hi) / 2;
                int cmp = hashcmp(index + mi * stride, sha1);
  
diff --cc t/test-lib.sh
Simple merge