Skip to content
Browse files

string-list: document that string_list_insert() inserts unique strings

Signed-off-by: Heiko Voigt <>
Signed-off-by: Junio C Hamano <>
  • Loading branch information...
1 parent 8ced9c9 commit b8939b2b3abaa99c18bf57251cd2828b89ac38c5 Heiko Voigt committed with gitster
Showing with 3 additions and 1 deletion.
  1. +3 −1 Documentation/technical/api-string-list.txt
4 Documentation/technical/api-string-list.txt
@@ -83,7 +83,9 @@ Functions
Insert a new element to the string_list. The returned pointer can be
handy if you want to write something to the `util` pointer of the
- string_list_item containing the just added string.
+ string_list_item containing the just added string. If the given
+ string already exists the insertion will be skipped and the
+ pointer to the existing item returned.
Since this function uses xrealloc() (which die()s if it fails) if the
list needs to grow, it is safe not to check the pointer. I.e. you may

0 comments on commit b8939b2

Please sign in to comment.
Something went wrong with that request. Please try again.