summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-11-24 18:45:36 +0700
committerJunio C Hamano <gitster@pobox.com>2016-11-28 15:30:17 -0800
commitfa6ca11105ccb46b785fd4ed58c333d5ad7f1774 (patch)
tree12367cdeb454f55591ec88b59f91e53a7c62e529 /pretty.c
parentac84098b7e32406a982ac01cc76a663d5605224b (diff)
downloadgit-nd/qsort-in-merge-recursive.tar.gz
merge-recursive.c: use string_list_sort instead of qsortnd/qsort-in-merge-recursive
Merge-recursive sorts a string list using a raw qsort(), where it feeds the "items" from one struct but the "nr" and size fields from another struct. This isn't a bug because one list is a copy of the other, but it's unnecessarily confusing (and also caused our recent QSORT() cleanups via coccinelle to miss this call site). Let's use string_list_sort() instead, which is more concise and harder to get wrong. Note that we need to adjust our comparison function, which gets fed only the strings now, not the string_list_items. That's OK because we don't use the "util" field as part of our sort. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
0 files changed, 0 insertions, 0 deletions