Re: [PATCH] merge-recursive.c: use QSORT macro

2016-11-23 Thread Junio C Hamano
Jeff King writes: > Another possibility is: > > df_sorted_entries.cmp = string_list_df_name_compare; > string_list_sort(&df_sorted_entries); > > It's not any shorter, but maybe it's conceptually simpler. My first reaction to Duy's patch was: it is moronic for the string-list API not to offer

Re: [PATCH] merge-recursive.c: use QSORT macro

2016-11-23 Thread Duy Nguyen
On Wed, Nov 23, 2016 at 12:49 AM, Jeff King wrote: > On Tue, Nov 22, 2016 at 07:30:19PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> This is the follow up of rs/qsort series, merged in b8688ad (Merge >> branch 'rs/qsort' - 2016-10-10), where coccinelle was used to do >> automatic transformation. >> >>

Re: [PATCH] merge-recursive.c: use QSORT macro

2016-11-22 Thread Jeff King
On Tue, Nov 22, 2016 at 07:30:19PM +0700, Nguyễn Thái Ngọc Duy wrote: > This is the follow up of rs/qsort series, merged in b8688ad (Merge > branch 'rs/qsort' - 2016-10-10), where coccinelle was used to do > automatic transformation. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > coccinelle m

[PATCH] merge-recursive.c: use QSORT macro

2016-11-22 Thread Nguyễn Thái Ngọc Duy
This is the follow up of rs/qsort series, merged in b8688ad (Merge branch 'rs/qsort' - 2016-10-10), where coccinelle was used to do automatic transformation. Signed-off-by: Nguyễn Thái Ngọc Duy --- coccinelle missed this place, understandably, because it can't know that sizeof(*entri