From 54876c6dfba771612245cf57b2217c5b00ced29d Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 7 May 2024 09:11:44 +0200 Subject: refs: add `exclude_patterns` parameter to `for_each_fullref_in()` The `for_each_fullref_in()` function is supposedly the ref-store-less equivalent of `refs_for_each_fullref_in()`, but the latter has gained a new parameter `exclude_patterns` over time. Bring these two functions back in sync again by adding the parameter to the former function, as well. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- refs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'refs.c') diff --git a/refs.c b/refs.c index 7cafda1c25..00bcc72719 100644 --- a/refs.c +++ b/refs.c @@ -1742,10 +1742,12 @@ int for_each_ref_in(const char *prefix, each_ref_fn fn, void *cb_data) return refs_for_each_ref_in(get_main_ref_store(the_repository), prefix, fn, cb_data); } -int for_each_fullref_in(const char *prefix, each_ref_fn fn, void *cb_data) +int for_each_fullref_in(const char *prefix, + const char **exclude_patterns, + each_ref_fn fn, void *cb_data) { - return do_for_each_ref(get_main_ref_store(the_repository), - prefix, NULL, fn, 0, 0, cb_data); + return refs_for_each_fullref_in(get_main_ref_store(the_repository), + prefix, exclude_patterns, fn, cb_data); } int refs_for_each_fullref_in(struct ref_store *refs, const char *prefix, -- cgit v1.3-6-g1900