diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-04-03 13:01:08 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-03 13:01:09 -0700 |
| commit | 0cd4fb9f46eb0ebd0d243a886ce9a52210e0723e (patch) | |
| tree | 8069cdba6fa414dc0cb1e11c5c7de7446ef6071f /string-list.h | |
| parent | 4e5821732e684f21a35288d8e67f453ca2595083 (diff) | |
| parent | 5c58dbc887a1f3530cb29c995f63675beebb22e9 (diff) | |
| download | git-0cd4fb9f46eb0ebd0d243a886ce9a52210e0723e.tar.xz | |
Merge branch 'ar/config-hook-cleanups'
Code clean-up around the recent "hooks defined in config" topic.
* ar/config-hook-cleanups:
hook: reject unknown hook names in git-hook(1)
hook: show disabled hooks in "git hook list"
hook: show config scope in git hook list
hook: introduce hook_config_cache_entry for per-hook data
t1800: add test to verify hook execution ordering
hook: make consistent use of friendly-name in docs
hook: replace hook_list_clear() -> string_list_clear_func()
hook: detect & emit two more bugs
hook: rename cb_data_free/alloc -> hook_data_free/alloc
hook: fix minor style issues
builtin/receive-pack: properly init receive_hook strbuf
hook: move unsorted_string_list_remove() to string-list.[ch]
Diffstat (limited to 'string-list.h')
| -rw-r--r-- | string-list.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/string-list.h b/string-list.h index 3ad862a187..b86ee7c099 100644 --- a/string-list.h +++ b/string-list.h @@ -266,6 +266,14 @@ struct string_list_item *unsorted_string_list_lookup(struct string_list *list, void unsorted_string_list_delete_item(struct string_list *list, int i, int free_util); /** + * Remove the first item matching `str` from an unsorted string_list. + * No-op if `str` is not found. If `free_util` is non-zero, the `util` + * pointer of the removed item is freed before deletion. + */ +void unsorted_string_list_remove(struct string_list *list, const char *str, + int free_util); + +/** * Split string into substrings on characters in `delim` and append the * substrings to `list`. The input string is not modified. * list->strdup_strings must be set, as new memory needs to be |
