Re: [PATCH] string_list API: document what "sorted" means.

2012-09-19 Thread Michael Haggerty
On 09/18/2012 07:21 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> If another sort order is needed, then we will either have to audit >> existing string_list users to make sure that they don't rely on strcmp() >> ordering, or we will have to implement strcmp() ordering *plus* the new >

Re: [PATCH] string_list API: document what "sorted" means.

2012-09-18 Thread Junio C Hamano
Michael Haggerty writes: > If another sort order is needed, then we will either have to audit > existing string_list users to make sure that they don't rely on strcmp() > ordering, or we will have to implement strcmp() ordering *plus* the new > ordering. What I was envisioning was to pass in an

Re: [PATCH] string_list API: document what "sorted" means.

2012-09-18 Thread Michael Haggerty
On 09/18/2012 10:19 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> 1. Document that string_list sorts entries according to their strcmp() >> order, as proposed in this patch. Then fetch can rely on this ordering. >> If somebody wants a different ordering in the future, it is easy to

Re: [PATCH] string_list API: document what "sorted" means.

2012-09-18 Thread Junio C Hamano
Michael Haggerty writes: > 1. Document that string_list sorts entries according to their strcmp() > order, as proposed in this patch. Then fetch can rely on this ordering. > If somebody wants a different ordering in the future, it is easy to > make the sort order a parameter. > > 2. Leave strin

Re: [PATCH] string_list API: document what "sorted" means.

2012-09-18 Thread Michael Haggerty
On 09/17/2012 11:17 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Junio pointed out that the sort order currently used by string_list >> could be considered to be an implementation detail internal to >> string_list. But the sort order is already visible to the outside >> world (e.g.,

Re: [PATCH] string_list API: document what "sorted" means.

2012-09-17 Thread Junio C Hamano
Michael Haggerty writes: > Junio pointed out that the sort order currently used by string_list > could be considered to be an implementation detail internal to > string_list. But the sort order is already visible to the outside > world (e.g., via iteration or via print_string_list()), so it > sh

[PATCH] string_list API: document what "sorted" means.

2012-09-17 Thread Michael Haggerty
Junio pointed out that the sort order currently used by string_list could be considered to be an implementation detail internal to string_list. But the sort order is already visible to the outside world (e.g., via iteration or via print_string_list()), so it shouldn't be changed willy-nilly. Ther