commit-graph: replace packed_oid_list with oid_array
authorJeff King <peff@peff.net>
Mon, 7 Dec 2020 19:11:05 +0000 (14:11 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Dec 2020 20:32:04 +0000 (12:32 -0800)
commita5f1c448998fba5f5a1b00e1b9a779176ec665a6
tree7bd3a7a74515c250dec924ceed5087e370eb7dce
parent1cbdbf3bef7e9167794cb2c12f9af1a450584ebe
commit-graph: replace packed_oid_list with oid_array

Our custom packed_oid_list data structure is really just an oid_array in
disguise. Let's switch to using the generic structure, which shortens
and simplifies the code slightly.

There's one slightly awkward part: in the old code we copied a hash
straight from the mmap'd on-disk data into the final object_id. And now
we'll copy to a temporary oid, which we'll then pass to
oid_array_append(). But this is an operation we have to do all over the
commit-graph code already, since it mostly uses object_id structs
internally. I also measured "git commit-graph --append", which triggers
this code path, and it showed no difference.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c