]> git.ipfire.org Git - thirdparty/git.git/commit
ref-filter: allow NULL filter pattern
authorJustin Tobler <jltobler@gmail.com>
Tue, 21 Oct 2025 18:25:56 +0000 (13:25 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Oct 2025 21:40:37 +0000 (14:40 -0700)
commiteafc03dbe316478acff5eef3b70c037de4758f08
tree20e2099e616b93fff16edc212ee73571bd1ce6dd
parent026ad6016070748a66ed9a977ad90efc08df2225
ref-filter: allow NULL filter pattern

When setting up `struct ref_filter` for filter_refs(), the
`name_patterns` field must point to an array of pattern strings even if
no patterns are required. To improve this interface, treat a NULL
`name_patterns` field the same as when it points to an empty array.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ref-filter.c