]> git.ipfire.org Git - thirdparty/git.git/commit - pack-objects.c
pack-objects: use object_id in packlist_alloc()
authorJeff King <peff@peff.net>
Thu, 5 Sep 2019 22:52:25 +0000 (18:52 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Sep 2019 18:03:39 +0000 (11:03 -0700)
commitf1cbd033e201a18c7175bc6509b48d6243e79739
tree570056d516b231b921e53f5292e0f61dc001cc66
parent0dfed92dfdb95c2f12df7299bb1e606d79185626
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>
builtin/pack-objects.c
pack-objects.c
pack-objects.h