Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-07-13 10:42:08 +0400
committerJunio C Hamano <gitster@pobox.com>2014-07-14 05:59:05 +0400
commit94d5a22cf651174f91d40a140593628a04fdacf3 (patch)
treee07d447848193680f33a628cad544c0b5cdfe540 /cache.h
parent8ff226a9d5ee065fe52752e6032f63cb6e4beccb (diff)
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index df65231ac3..42a5e865b5 100644
--- a/cache.h
+++ b/cache.h
@@ -1376,6 +1376,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)))