diff options
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sha1_file.c b/sha1_file.c index 278ba2f..e89d24c 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1292,7 +1292,7 @@ static void *read_packed_sha1(const unsigned char *sha1, char *type, unsigned lo 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; @@ -1757,10 +1757,7 @@ int has_sha1_file(const unsigned char *sha1) if (find_pack_entry(sha1, &e, NULL)) return 1; - if (find_sha1_file(sha1, &st)) - return 1; - reprepare_packed_git(); - return find_pack_entry(sha1, &e, NULL); + return find_sha1_file(sha1, &st) ? 1 : 0; } /* |