commit-graph: use commit_list_count()
commit689a146c914d861a5bc8b88643802a1ede013dce
authorRené Scharfe <l.s.r@web.de>
Sun, 15 Sep 2019 17:07:44 +0000 (15 19:07 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Sep 2019 20:00:50 +0000 (16 13:00 -0700)
tree308652c97b17975adab5d0c2a323fc7c3df38ef3
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
commit-graph: use commit_list_count()

Let commit_list_count() count the number of parents instead of
duplicating it.  Also store the result in an unsigned int, as that's
what the function returns, and the count is never negative.

Signed-off-by: René Scharfe <l.s.r@web.de>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c