diff options
author | Stefan Beller <sbeller@google.com> | 2018-04-25 11:21:04 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-26 10:54:27 +0900 |
commit | 57a6a500be8d8ee903a1dc9ea607063a1bc88a0b (patch) | |
tree | 509aebb4765d687f4d6aa8a9e90eb967d7af92e6 /packfile.h | |
parent | packfile: add repository argument to read_object (diff) | |
download | tgif-57a6a500be8d8ee903a1dc9ea607063a1bc88a0b.tar.xz |
packfile: add repository argument to unpack_entry
Add a repository argument to allow the callers of unpack_entry
to be more specific about which repository to act on. 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 bc8d840b1b..1efa57a90e 100644 --- a/packfile.h +++ b/packfile.h @@ -115,7 +115,8 @@ extern off_t nth_packed_object_offset(const struct packed_git *, uint32_t n); extern off_t find_pack_entry_one(const unsigned char *sha1, struct packed_git *); extern int is_pack_valid(struct packed_git *); -extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsigned long *); +#define unpack_entry(r, p, of, ot, s) unpack_entry_##r(p, of, ot, s) +extern void *unpack_entry_the_repository(struct packed_git *, off_t, enum object_type *, unsigned long *); extern unsigned long unpack_object_header_buffer(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep); extern unsigned long get_size_from_delta(struct packed_git *, struct pack_window **, off_t); extern int unpack_object_header(struct packed_git *, struct pack_window **, off_t *, unsigned long *); |