diff options
author | Stefan Beller <sbeller@google.com> | 2018-03-23 18:45:25 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-26 10:07:43 -0700 |
commit | 613b42f283140308435939377994c4d57d0dda23 (patch) | |
tree | f0088bd534cbd2fdef645ddb046814ff9aae5c7d /packfile.h | |
parent | packfile: allow reprepare_packed_git to handle arbitrary repositories (diff) | |
download | tgif-613b42f283140308435939377994c4d57d0dda23.tar.xz |
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 'packfile.h')
-rw-r--r-- | packfile.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packfile.h b/packfile.h index ee6da3a9ae..e68f790ea7 100644 --- a/packfile.h +++ b/packfile.h @@ -123,7 +123,12 @@ extern int packed_object_info(struct packed_git *pack, off_t offset, struct obje extern void mark_bad_packed_object(struct packed_git *p, const unsigned char *sha1); extern const struct packed_git *has_packed_and_bad(const unsigned char *sha1); -extern int find_pack_entry(const unsigned char *sha1, struct pack_entry *e); +/* + * Iff a pack file in the given repository contains the object named by sha1, + * return true and store its location to e. + */ +#define find_pack_entry(r, s, e) find_pack_entry_##r(s, e) +extern int find_pack_entry_the_repository(const unsigned char *sha1, struct pack_entry *e); extern int has_sha1_pack(const unsigned char *sha1); |