Re: [PATCH 3/6] prune_remote(): sort delete_refs_list references en masse

2014-11-25 Thread Michael Haggerty
On 11/25/2014 08:21 AM, Michael Haggerty wrote: On 11/21/2014 05:44 PM, Junio C Hamano wrote: [...] Eh, why is that called sort_string_list()? Perhaps it is a good opening to introduce string_list_sort(list, flag) where flag would be a bitmask that represents ignore-case, uniquify, etc., and

Re: [PATCH 3/6] prune_remote(): sort delete_refs_list references en masse

2014-11-24 Thread Michael Haggerty
On 11/21/2014 05:44 PM, Junio C Hamano wrote: On Fri, Nov 21, 2014 at 6:09 AM, Michael Haggerty mhag...@alum.mit.edu wrote: Inserting items into a list in sorted order is O(N^2) whereas appending them unsorted and then sorting the list all at once is O(N lg N). string_list_insert() also

Re: [PATCH 3/6] prune_remote(): sort delete_refs_list references en masse

2014-11-22 Thread Jonathan Nieder
Michael Haggerty wrote: Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- builtin/remote.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) This and 2/6 are also Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- To unsubscribe from this list: send the line unsubscribe git in

[PATCH 3/6] prune_remote(): sort delete_refs_list references en masse

2014-11-21 Thread Michael Haggerty
Inserting items into a list in sorted order is O(N^2) whereas appending them unsorted and then sorting the list all at once is O(N lg N). string_list_insert() also removes duplicates, and this change loses that functionality. But the strings in this list, which ultimately come from a

Re: [PATCH 3/6] prune_remote(): sort delete_refs_list references en masse

2014-11-21 Thread Junio C Hamano
On Fri, Nov 21, 2014 at 6:09 AM, Michael Haggerty mhag...@alum.mit.edu wrote: Inserting items into a list in sorted order is O(N^2) whereas appending them unsorted and then sorting the list all at once is O(N lg N). string_list_insert() also removes duplicates, and this change loses that