summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-08-20 18:24:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-21 17:22:50 (GMT)
commit212e0f7efe163d062dcd393a0788cf3f93544a6e (patch)
tree27a44ad4741b9d0b6ee56713a99affdc764bfaf2 /refs.c
parent4a6067cda51b592871144eb050d4673db9ad5103 (diff)
downloadgit-212e0f7efe163d062dcd393a0788cf3f93544a6e.zip
git-212e0f7efe163d062dcd393a0788cf3f93544a6e.tar.gz
git-212e0f7efe163d062dcd393a0788cf3f93544a6e.tar.bz2
refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/refs.c b/refs.c
index 7cd76f7..c5a5f72 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)