return unpack_entry(&e, type, size);
}
-void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size)
+void *read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size)
{
unsigned long mapsize;
void *map, *buf;
if (find_pack_entry(sha1, &e, NULL))
return 1;
- return find_sha1_file(sha1, &st) ? 1 : 0;
+ if (find_sha1_file(sha1, &st))
+ return 1;
+ reprepare_packed_git();
+ return find_pack_entry(sha1, &e, NULL);
}
/*