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>
This commit is contained in:
committed by
Junio C Hamano
parent
0dfed92dfd
commit
f1cbd033e2
@ -1147,7 +1147,7 @@ static void create_object_entry(const struct object_id *oid,
|
||||
{
|
||||
struct object_entry *entry;
|
||||
|
||||
entry = packlist_alloc(&to_pack, oid->hash, index_pos);
|
||||
entry = packlist_alloc(&to_pack, oid, index_pos);
|
||||
entry->hash = hash;
|
||||
oe_set_type(entry, type);
|
||||
if (exclude)
|
||||
|
||||
Reference in New Issue
Block a user