diff options
author | Stefan Beller <sbeller@google.com> | 2018-08-20 18:24:19 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-21 10:22:50 -0700 |
commit | 212e0f7efe163d062dcd393a0788cf3f93544a6e (patch) | |
tree | 27a44ad4741b9d0b6ee56713a99affdc764bfaf2 /refs.c | |
parent | refs.c: migrate internal ref iteration to pass thru repository argument (diff) | |
download | tgif-212e0f7efe163d062dcd393a0788cf3f93544a6e.tar.xz |
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.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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) |