summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-04-12 00:21:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-12 02:38:56 (GMT)
commit23a3f0cb16caa1cc79cf0af42a92bff61fe955a4 (patch)
treeac39b7949dfede5d6b4df172320a010dede6ef74 /revision.c
parentc3c36d7de2cf09fb05701ed672b26c51a008f5cd (diff)
downloadgit-23a3f0cb16caa1cc79cf0af42a92bff61fe955a4.zip
git-23a3f0cb16caa1cc79cf0af42a92bff61fe955a4.tar.gz
git-23a3f0cb16caa1cc79cf0af42a92bff61fe955a4.tar.bz2
refs: add repository argument to get_main_ref_store
Add a repository argument to allow the get_main_ref_store caller 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 'revision.c')
-rw-r--r--revision.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/revision.c b/revision.c
index b42c836..1cff118 100644
--- a/revision.c
+++ b/revision.c
@@ -6,6 +6,7 @@
#include "diff.h"
#include "refs.h"
#include "revision.h"
+#include "repository.h"
#include "graph.h"
#include "grep.h"
#include "reflog-walk.h"
@@ -1285,7 +1286,7 @@ void add_reflogs_to_pending(struct rev_info *revs, unsigned flags)
cb.all_revs = revs;
cb.all_flags = flags;
- cb.refs = get_main_ref_store();
+ cb.refs = get_main_ref_store(the_repository);
for_each_reflog(handle_one_reflog, &cb);
if (!revs->single_worktree)
@@ -2176,7 +2177,7 @@ static int handle_revision_pseudo_opt(const char *submodule,
die("BUG: --single-worktree cannot be used together with submodule");
refs = get_submodule_ref_store(submodule);
} else
- refs = get_main_ref_store();
+ refs = get_main_ref_store(the_repository);
/*
* NOTE!