aboutsummaryrefslogtreecommitdiff
path: root/string-list.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-15 10:24:53 -0800
committerJunio C Hamano <gitster@pobox.com>2012-11-15 10:24:53 -0800
commit6050b5bca0f6d94d1d171d60b64ace87651383a1 (patch)
tree44c3e843fbe45bc88b5aa3cb0b537f52d386a995 /string-list.h
parent2be3d85a1c3760cba0960723ffed165f45fa36c6 (diff)
parent6fa23773d2fa257cf45fb20640d6286d13ded852 (diff)
downloadgit-6050b5bca0f6d94d1d171d60b64ace87651383a1.tar.gz
git-6050b5bca0f6d94d1d171d60b64ace87651383a1.tar.xz
Merge branch 'mh/notes-string-list'
Improve the asymptotic performance of the cat_sort_uniq notes merge strategy. * mh/notes-string-list: string_list_add_refs_from_colon_sep(): use string_list_split() notes: fix handling of colon-separated values combine_notes_cat_sort_uniq(): sort and dedup lines all at once Initialize sort_uniq_list using named constant string_list: add a function string_list_remove_empty_items()
Diffstat (limited to 'string-list.h')
-rw-r--r--string-list.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/string-list.h b/string-list.h
index 5efd07b44..c50b0d0de 100644
--- a/string-list.h
+++ b/string-list.h
@@ -39,6 +39,13 @@ void filter_string_list(struct string_list *list, int free_util,
string_list_each_func_t want, void *cb_data);
/*
+ * Remove any empty strings from the list. If free_util is true, call
+ * free() on the util members of any items that have to be deleted.
+ * Preserve the order of the items that are retained.
+ */
+void string_list_remove_empty_items(struct string_list *list, int free_util);
+
+/*
* Return the longest string in prefixes that is a prefix (in the
* sense of prefixcmp()) of string, or NULL if no such prefix exists.
* This function does not require the string_list to be sorted (it