diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2018-04-25 11:21:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-26 10:54:27 +0900 |
commit | 720aaa1a74a8cf5fcc35bb294013d30d218bec01 (patch) | |
tree | 12316a1673fa22866dd01106371835ab3c7f3565 /packfile.h | |
parent | 144f4948a134ed3eedeb87b688408c9d4da094ff (diff) | |
download | git-720aaa1a74a8cf5fcc35bb294013d30d218bec01.tar.gz |
packfile: add repository argument to packed_object_info
Add a repository argument to allow callers of packed_object_info to be
more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.
As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.h')
-rw-r--r-- | packfile.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packfile.h b/packfile.h index a92c0b241c..bc8d840b1b 100644 --- a/packfile.h +++ b/packfile.h @@ -125,7 +125,8 @@ extern void release_pack_memory(size_t); /* global flag to enable extra checks when accessing packed objects */ extern int do_check_packed_object_crc; -extern int packed_object_info(struct packed_git *pack, off_t offset, struct object_info *); +#define packed_object_info(r, p, o, oi) packed_object_info_##r(p, o, oi) +extern int packed_object_info_the_repository(struct packed_git *pack, off_t offset, struct object_info *); 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); |