Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  string-list: document that string_list_insert() inserts unique strings
  • Loading branch information
Junio C Hamano committed Mar 31, 2012
2 parents b3065bd + b8939b2 commit 19a6cd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/technical/api-string-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19a6cd3

Please sign in to comment.