summaryrefslogtreecommitdiff
path: root/refs/files-backend.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-07-10 21:12:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-07-10 21:48:55 (GMT)
commitb269ac53c07aa46d5a88d05dac8216d189e69a50 (patch)
treeb1cfa35537b5721776c98277024291fa7352aae7 /refs/files-backend.c
parent8255dd8a3dce094129690d17595dc822171d1e61 (diff)
downloadgit-b269ac53c07aa46d5a88d05dac8216d189e69a50.zip
git-b269ac53c07aa46d5a88d05dac8216d189e69a50.tar.gz
git-b269ac53c07aa46d5a88d05dac8216d189e69a50.tar.bz2
refs: plumb `exclude_patterns` argument throughout
The subsequent patch will want to access an optional `excluded_patterns` array within `refs/packed-backend.c` that will cull out certain references matching any of the given patterns on a best-effort basis. To do so, the refs subsystem needs to be updated to pass this value across a number of different locations. Prepare for a future patch by introducing this plumbing now, passing NULLs at top-level APIs in order to make that patch less noisy and more easily readable. Signed-off-by: Taylor Blau <me@ttaylorr.co> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/files-backend.c')
-rw-r--r--refs/files-backend.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index bca7b85..3bc3c57 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -829,7 +829,8 @@ static struct ref_iterator_vtable files_ref_iterator_vtable = {
static struct ref_iterator *files_ref_iterator_begin(
struct ref_store *ref_store,
- const char *prefix, unsigned int flags)
+ const char *prefix, const char **exclude_patterns,
+ unsigned int flags)
{
struct files_ref_store *refs;
struct ref_iterator *loose_iter, *packed_iter, *overlay_iter;
@@ -874,7 +875,7 @@ static struct ref_iterator *files_ref_iterator_begin(
* the packed and loose references.
*/
packed_iter = refs_ref_iterator_begin(
- refs->packed_ref_store, prefix, 0,
+ refs->packed_ref_store, prefix, exclude_patterns, 0,
DO_FOR_EACH_INCLUDE_BROKEN);
overlay_iter = overlay_ref_iterator_begin(loose_iter, packed_iter);