summaryrefslogtreecommitdiff
path: root/Documentation/technical/api-string-list.txt
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2012-09-12 14:04:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-12 18:43:25 (GMT)
commit31d5451eed2677531c80177ff9dc8f5285f5a187 (patch)
treebd709b58ba3096867e2f6166f516773b67aad0e1 /Documentation/technical/api-string-list.txt
parenteb5f0c7a616531a024a582b72ca6d8775ff98d46 (diff)
downloadgit-31d5451eed2677531c80177ff9dc8f5285f5a187.zip
git-31d5451eed2677531c80177ff9dc8f5285f5a187.tar.gz
git-31d5451eed2677531c80177ff9dc8f5285f5a187.tar.bz2
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/api-string-list.txt')
-rw-r--r--Documentation/technical/api-string-list.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt
index 300b301..0f8b7ce 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`::