summaryrefslogtreecommitdiff
path: root/pack-objects.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-02-23 23:30:07 -0500
committerJunio C Hamano <gitster@pobox.com>2020-02-24 12:55:52 -0800
commita93c141ddef25dc999fff73c590b42d3af606ff3 (patch)
tree96c8599bacfd25c5e348dcba39a62411ac02c8e7 /pack-objects.c
parent3f83fd5e44c1f038c8a7033cb77399e9ef4f43a9 (diff)
downloadgit-a93c141ddef25dc999fff73c590b42d3af606ff3.tar.gz
pack-objects: convert oe_set_delta_ext() to use object_id
We already store an object_id internally, and now our sole caller also has one. Let's stop passing around the internal hash array, which adds a bit of type safety. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-objects.c')
-rw-r--r--pack-objects.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pack-objects.c b/pack-objects.c
index 5e5a3c62d9..f2a433885a 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -203,14 +203,14 @@ struct object_entry *packlist_alloc(struct packing_data *pdata,
void oe_set_delta_ext(struct packing_data *pdata,
struct object_entry *delta,
- const unsigned char *sha1)
+ const struct object_id *oid)
{
struct object_entry *base;
ALLOC_GROW(pdata->ext_bases, pdata->nr_ext + 1, pdata->alloc_ext);
base = &pdata->ext_bases[pdata->nr_ext++];
memset(base, 0, sizeof(*base));
- hashcpy(base->idx.oid.hash, sha1);
+ oidcpy(&base->idx.oid, oid);
/* These flags mark that we are not part of the actual pack output. */
base->preferred_base = 1;