diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2012-09-12 16:04:45 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-12 20:43:25 +0200 |
commit | 31d5451eed2677531c80177ff9dc8f5285f5a187 (patch) | |
tree | bd709b58ba3096867e2f6166f516773b67aad0e1 /Documentation/technical | |
parent | string_list: add a new function, filter_string_list() (diff) | |
download | git-31d5451eed2677531c80177ff9dc8f5285f5a187.tar.xz git-31d5451eed2677531c80177ff9dc8f5285f5a187.zip |
string_list: add a new function, string_list_remove_duplicates()
Add a function that deletes duplicate entries from a sorted
string_list.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
-rw-r--r-- | Documentation/technical/api-string-list.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt index 300b301093..0f8b7cee36 100644 --- a/Documentation/technical/api-string-list.txt +++ b/Documentation/technical/api-string-list.txt @@ -30,6 +30,9 @@ member (you need this if you add things later) and you should set the . Can sort an unsorted list using `sort_string_list`. +. Can remove duplicate items from a sorted list using + `string_list_remove_duplicates`. + . Can remove individual items of an unsorted list using `unsorted_string_list_delete_item`. @@ -108,6 +111,12 @@ write `string_list_insert(...)->util = ...;`. Look up a given string in the string_list, returning the containing string_list_item. If the string is not found, NULL is returned. +`string_list_remove_duplicates`:: + + Remove all but the first of consecutive entries that have the + same string value. If free_util is true, call free() on the + util members of any items that have to be deleted. + * Functions for unsorted lists only `string_list_append`:: |