summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2018-04-25 18:21:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-26 01:54:27 (GMT)
commit720aaa1a74a8cf5fcc35bb294013d30d218bec01 (patch)
tree12316a1673fa22866dd01106371835ab3c7f3565 /builtin
parent144f4948a134ed3eedeb87b688408c9d4da094ff (diff)
downloadgit-720aaa1a74a8cf5fcc35bb294013d30d218bec01.zip
git-720aaa1a74a8cf5fcc35bb294013d30d218bec01.tar.gz
git-720aaa1a74a8cf5fcc35bb294013d30d218bec01.tar.bz2
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 'builtin')
-rw-r--r--builtin/pack-objects.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 8d4111f..d65eb4a 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -1572,7 +1572,8 @@ static void drop_reused_delta(struct object_entry *entry)
oi.sizep = &entry->size;
oi.typep = &entry->type;
- if (packed_object_info(entry->in_pack, entry->in_pack_offset, &oi) < 0) {
+ if (packed_object_info(the_repository, entry->in_pack,
+ entry->in_pack_offset, &oi) < 0) {
/*
* We failed to get the info from this pack for some reason;
* fall back to sha1_object_info, which may find another copy.