summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 693d2bc)
raw | patch | inline | side by side (parent: 693d2bc)
author | James Bowes <jbowes@dangerouslyinc.com> | |
Tue, 29 May 2007 23:29:51 +0000 (19:29 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 30 May 2007 00:53:44 +0000 (17:53 -0700) |
find_short_packed_object was not loading the pack index files.
Teach it to do so.
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Teach it to do so.
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_name.c | patch | blob | history |
diff --git a/sha1_name.c b/sha1_name.c
index 8dfceb2d7fc769c554e4b2d59cd41e7b04973533..7df01af78805686572e32d5ade1460fc925a9a71 100644 (file)
--- a/sha1_name.c
+++ b/sha1_name.c
prepare_packed_git();
for (p = packed_git; p && found < 2; p = p->next) {
- uint32_t num = p->num_objects;
- uint32_t first = 0, last = num;
+ uint32_t num, last;
+ uint32_t first = 0;
+ open_pack_index(p);
+ num = p->num_objects;
+ last = num;
while (first < last) {
uint32_t mid = (first + last) / 2;
const unsigned char *now;