commit-graph: use size_t for array allocation and indexing
commit3361390cbedc962adcddcfd98676695c125fa180
authorJeff King <peff@peff.net>
Mon, 7 Dec 2020 19:11:08 +0000 (7 14:11 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Dec 2020 20:32:04 +0000 (7 12:32 -0800)
treea1e0134536a215471e6b68516e624f7c830495a7
parenta5f1c448998fba5f5a1b00e1b9a779176ec665a6
commit-graph: use size_t for array allocation and indexing

Our packed_commit_list is an array of pointers to commit structs. We use
"int" for the allocation, which is 32-bit even on 64-bit platforms. This
isn't likely to overflow in practice (we're writing commit graphs, so
you'd need to actually have billions of unique commits in the
repository). But it's good practice to use size_t for allocations.

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