]> git.ipfire.org Git - thirdparty/git.git/commit
string-list: split-then-remove-empty can be done while splitting
authorJunio C Hamano <gitster@pobox.com>
Fri, 1 Aug 2025 22:04:23 +0000 (15:04 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 3 Aug 2025 05:34:45 +0000 (22:34 -0700)
commit2ab2aac73d234ae75096e2186b07cc14c57d2586
tree649169187f4fa82992977d92c11e6bac5e2a474d
parent27531efa41cfa882473513dd93e696a16f6eb87b
string-list: split-then-remove-empty can be done while splitting

Thanks to the new STRING_LIST_SPLIT_NONEMPTY flag, a common pattern
to split a string into a string list and then remove empty items in
the resulting list is no longer needed.  Instead, just tell the
string_list_split*() to omit empty ones while splitting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
notes.c
pathspec.c
t/helper/test-hashmap.c
t/helper/test-json-writer.c