From 212e0f7efe163d062dcd393a0788cf3f93544a6e Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Mon, 20 Aug 2018 18:24:19 +0000 Subject: refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback Signed-off-by: Stefan Beller Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- refs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'refs.c') diff --git a/refs.c b/refs.c index 7cd76f72d2..c5a5f727e8 100644 --- a/refs.c +++ b/refs.c @@ -1474,12 +1474,11 @@ int refs_for_each_fullref_in(struct ref_store *refs, const char *prefix, return do_for_each_ref(refs, prefix, fn, 0, flag, cb_data); } -int for_each_replace_ref(struct repository *r, each_ref_fn fn, void *cb_data) +int for_each_replace_ref(struct repository *r, each_repo_ref_fn fn, void *cb_data) { - return do_for_each_ref(get_main_ref_store(r), - git_replace_ref_base, fn, - strlen(git_replace_ref_base), - DO_FOR_EACH_INCLUDE_BROKEN, cb_data); + return do_for_each_repo_ref(r, git_replace_ref_base, fn, + strlen(git_replace_ref_base), + DO_FOR_EACH_INCLUDE_BROKEN, cb_data); } int for_each_namespaced_ref(each_ref_fn fn, void *cb_data) -- cgit v1.2.3