From f1cbd033e201a18c7175bc6509b48d6243e79739 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 5 Sep 2019 18:52:25 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- pack-objects.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pack-objects.h') 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, -- cgit v1.2.3