From 5de7f500c13c8158696a68d86da1030313ddaf69 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 13 Jul 2014 02:42:08 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index cc46be4e0f..c708062df9 100644 --- a/cache.h +++ b/cache.h @@ -1354,6 +1354,7 @@ extern void *alloc_commit_node(void); extern void *alloc_tag_node(void); extern void *alloc_object_node(void); extern void alloc_report(void); +extern unsigned int alloc_commit_index(void); /* trace.c */ __attribute__((format (printf, 1, 2))) -- cgit v1.2.1