diff options
author | Stefan Beller <sbeller@google.com> | 2018-03-23 20:45:25 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-26 20:07:43 +0300 |
commit | 613b42f283140308435939377994c4d57d0dda23 (patch) | |
tree | f0088bd534cbd2fdef645ddb046814ff9aae5c7d /sha1_file.c | |
parent | 4c2a13b4e29f826dcbe0797beb64071fa61e531f (diff) |
packfile: add repository argument to find_pack_entry
While at it move the documentation to the header and mention which pack
files are searched.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sha1_file.c b/sha1_file.c index 9c024cd957..314ff55b47 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1266,7 +1266,7 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi, } while (1) { - if (find_pack_entry(real, &e)) + if (find_pack_entry(the_repository, real, &e)) break; /* Most likely it's a loose object. */ @@ -1275,7 +1275,7 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi, /* Not a loose object; someone else may have just packed it. */ reprepare_packed_git(the_repository); - if (find_pack_entry(real, &e)) + if (find_pack_entry(the_repository, real, &e)) break; /* Check if it is a missing object */ @@ -1655,7 +1655,7 @@ static int freshen_loose_object(const unsigned char *sha1) static int freshen_packed_object(const unsigned char *sha1) { struct pack_entry e; - if (!find_pack_entry(sha1, &e)) + if (!find_pack_entry(the_repository, sha1, &e)) return 0; if (e.p->freshened) return 1; |