Skip to content

Commit b8939b2

Browse files
hvoigtgitster
authored andcommitted
string-list: document that string_list_insert() inserts unique strings
Signed-off-by: Heiko Voigt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8ced9c9 commit b8939b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/technical/api-string-list.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ Functions
8383

8484
Insert a new element to the string_list. The returned pointer can be
8585
handy if you want to write something to the `util` pointer of the
86-
string_list_item containing the just added string.
86+
string_list_item containing the just added string. If the given
87+
string already exists the insertion will be skipped and the
88+
pointer to the existing item returned.
8789
+
8890
Since this function uses xrealloc() (which die()s if it fails) if the
8991
list needs to grow, it is safe not to check the pointer. I.e. you may

0 commit comments

Comments
 (0)