alloc: factor out commit index
authorJeff King <redacted>
Sun, 13 Jul 2014 06:42:08 +0000 (02:42 -0400)
committerJunio C Hamano <redacted>
Mon, 28 Jul 2014 17:14:33 +0000 (10:14 -0700)
commit5de7f500c13c8158696a68d86da1030313ddaf69
tree73eee5d136d2b00c623c3fceceffab85c9e9b47e
parentc4ad00f8ccb59a0ae0735e8e32b203d4bd835616
alloc: factor out commit index

We keep a static counter to set the commit index on newly
allocated objects. However, since we also need to set the
index on any_objects which are converted to commits, let's
make the counter available as a public function.

While we're moving it, let's make sure the counter is
allocated as an unsigned integer to match the index field in
"struct commit".

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
alloc.c
cache.h
git clone https://git.99rst.org/PROJECT