summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-04-12 00:21:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-12 02:38:56 (GMT)
commit60ce76d35819a9679104b6615aa0466ae49023a0 (patch)
treeed7f7da5ccb195dfd05989c82ac01efa4e85a7ec /builtin
parent23a3f0cb16caa1cc79cf0af42a92bff61fe955a4 (diff)
downloadgit-60ce76d35819a9679104b6615aa0466ae49023a0.zip
git-60ce76d35819a9679104b6615aa0466ae49023a0.tar.gz
git-60ce76d35819a9679104b6615aa0466ae49023a0.tar.bz2
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 <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/replace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/replace.c b/builtin/replace.c
index 935647b..237ea65 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;
}