diff options
author | Jeff King <peff@peff.net> | 2023-07-11 00:12:16 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-11 00:48:55 +0300 |
commit | 284c55deb53921457929ca2afe231c48e6cada85 (patch) | |
tree | 994fb483d381281dd85b539b1864b6f19b6604a6 /ref-filter.h | |
parent | b571fb98008b485bfc6f7d6538b79a7e92d731f4 (diff) |
ref-filter.c: parameterize match functions over patterns
`match_pattern()` and `match_name_as_path()` both take a `struct
ref_filter *`, and then store a stack variable `patterns` pointing at
`filter->patterns`.
The subsequent patch will add a new array of patterns to match over (the
excluded patterns, via a new `git for-each-ref --exclude` option),
treating the return value of these functions differently depending on
which patterns are being used to match.
Tweak `match_pattern()` and `match_name_as_path()` to take an array of
patterns to prepare for passing either in.
Once we start passing either in, `match_pattern()` will have little to
do with a particular `struct ref_filter *` instance. To clarify this,
drop it from the argument list, and replace it with the only bit of the
`ref_filter` that we care about (`filter->ignore_case`).
Co-authored-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.h')
0 files changed, 0 insertions, 0 deletions