t/test-lib.sh: Protect ourselves from common misconfiguration
[gitweb.git] / sha1_name.c
index 267ea3f3edc63600bc1591d2115ee85222f3e8c5..b0b12bbe9de11403c5965518026433c8851e092b 100644 (file)
@@ -76,7 +76,7 @@ static int find_short_packed_object(int len, const unsigned char *match, unsigne
 
        prepare_packed_git();
        for (p = packed_git; p && found < 2; p = p->next) {
-               uint32_t num = num_packed_objects(p);
+               uint32_t num = p->num_objects;
                uint32_t first = 0, last = num;
                while (first < last) {
                        uint32_t mid = (first + last) / 2;