summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2018-05-08 12:37:33 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-09 12:12:36 +0900
commitdd5d9deb0155a27cb2d74d1a0faf0af84ef5f355 (patch)
tree9be9ce4fda0e7b0d5ea7b1f9655897f24513f929 /cache.h
parentalloc: add repository argument to alloc_report (diff)
downloadtgif-dd5d9deb0155a27cb2d74d1a0faf0af84ef5f355.tar.xz
alloc: add repository argument to alloc_commit_index
This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. Use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 01cc207d21..0e6c5dd563 100644
--- a/cache.h
+++ b/cache.h
@@ -1776,7 +1776,8 @@ extern void *alloc_tag_node_the_repository(void);
extern void *alloc_object_node_the_repository(void);
#define alloc_report(r) alloc_report_##r()
extern void alloc_report_the_repository(void);
-extern unsigned int alloc_commit_index(void);
+#define alloc_commit_index(r) alloc_commit_index_##r()
+extern unsigned int alloc_commit_index_the_repository(void);
/* pkt-line.c */
void packet_trace_identity(const char *prog);