diff options
author | Jeff King <peff@peff.net> | 2019-09-05 18:52:25 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-06 11:03:39 -0700 |
commit | f1cbd033e201a18c7175bc6509b48d6243e79739 (patch) | |
tree | 570056d516b231b921e53f5292e0f61dc001cc66 /pack-objects.h | |
parent | 0dfed92dfdb95c2f12df7299bb1e606d79185626 (diff) | |
download | git-f1cbd033e201a18c7175bc6509b48d6243e79739.tar.gz |
pack-objects: use object_id in packlist_alloc()
The only caller of packlist_alloc() already has a "struct object_id",
and we immediately copy the hash they pass us into our own object_id.
Let's avoid the unnecessary round-trip to a raw sha1 pointer.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-objects.h')
-rw-r--r-- | pack-objects.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-objects.h b/pack-objects.h index 857d43850b..47bf7ebf86 100644 --- a/pack-objects.h +++ b/pack-objects.h @@ -183,7 +183,7 @@ static inline void packing_data_unlock(struct packing_data *pdata) } struct object_entry *packlist_alloc(struct packing_data *pdata, - const unsigned char *sha1, + const struct object_id *oid, uint32_t index_pos); struct object_entry *packlist_find(struct packing_data *pdata, |