]> Pileus Git - ~andy/git/commitdiff
string_list API: document what "sorted" means
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 17 Sep 2012 15:21:07 +0000 (17:21 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Sep 2012 18:41:06 +0000 (11:41 -0700)
The recent work on using string_list to represent the list of refs
that matched with the refs on the other side during fetch heavily
depends on the sort order by string_list's implementation, and
changing string_list will break it.  Document that it uses strcmp()
order, at least for now.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/api-string-list.txt

index 155ac8cb10d53053eb37bf0ea52d42623d6cb3c9..94d7a2bd999ce5e8603f6d6639ba34d224c2bee5 100644 (file)
@@ -1,8 +1,9 @@
 string-list API
 ===============
 
-The string_list API offers a data structure and functions to handle sorted
-and unsorted string lists.
+The string_list API offers a data structure and functions to handle
+sorted and unsorted string lists.  A "sorted" list is one whose
+entries are sorted by string value in `strcmp()` order.
 
 The 'string_list' struct used to be called 'path_list', but was renamed
 because it is not specific to paths.
@@ -143,7 +144,7 @@ write `string_list_insert(...)->util = ...;`.
 
 `sort_string_list`::
 
-       Make an unsorted list sorted.
+       Sort the list's entries by string value in `strcmp()` order.
 
 `unsorted_string_list_has_string`::