From 60ce76d35819a9679104b6615aa0466ae49023a0 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Wed, 11 Apr 2018 17:21:10 -0700 Subject: refs: add repository argument to for_each_replace_ref Add a repository argument to allow for_each_replace_ref callers to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- builtin/replace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builtin/replace.c') diff --git a/builtin/replace.c b/builtin/replace.c index 935647be6b..237ea656cf 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -14,6 +14,8 @@ #include "refs.h" #include "parse-options.h" #include "run-command.h" +#include "object-store.h" +#include "repository.h" #include "tag.h" static const char * const git_replace_usage[] = { @@ -83,7 +85,7 @@ static int list_replace_refs(const char *pattern, const char *format) "valid formats are 'short', 'medium' and 'long'\n", format); - for_each_replace_ref(show_reference, (void *)&data); + for_each_replace_ref(the_repository, show_reference, (void *)&data); return 0; } -- cgit v1.2.3