summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-18 05:19:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-18 05:19:06 (GMT)
commit7c9375db0e3063cf2f20970ff9e36e720f823181 (patch)
tree390e022d3cf81b5c6a250b065b9f4adf24bcdb37 /sha1_file.c
parentd9e85860567cdbf867a9af20997735f06db12ec5 (diff)
parent39b00fa4d41d0fae458d03df0ebc0bf7dfde6ac8 (diff)
downloadgit-7c9375db0e3063cf2f20970ff9e36e720f823181.zip
git-7c9375db0e3063cf2f20970ff9e36e720f823181.tar.gz
git-7c9375db0e3063cf2f20970ff9e36e720f823181.tar.bz2
Merge branch 'jk/drop-sha1-entry-pos' into maint
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
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 4fa4b18..9008d6a 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2761,7 +2761,6 @@ off_t find_pack_entry_one(const unsigned char *sha1,
const uint32_t *level1_ofs = p->index_data;
const unsigned char *index = p->index_data;
unsigned hi, lo, stride;
- static int use_lookup = -1;
static int debug_lookup = -1;
if (debug_lookup < 0)
@@ -2791,16 +2790,6 @@ off_t find_pack_entry_one(const unsigned char *sha1,
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);
- }
-
while (lo < hi) {
unsigned mi = (lo + hi) / 2;
int cmp = hashcmp(index + mi * stride, sha1);