summaryrefslogtreecommitdiff
path: root/t/helper/test-match-trees.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-11-24 18:45:36 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-11-28 15:30:17 -0800
commitfa6ca11105ccb46b785fd4ed58c333d5ad7f1774 (patch)
tree12367cdeb454f55591ec88b59f91e53a7c62e529 /t/helper/test-match-trees.c
parentGit 2.10.2 (diff)
downloadtgif-fa6ca11105ccb46b785fd4ed58c333d5ad7f1774.tar.xz
merge-recursive.c: use string_list_sort instead of qsort
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 't/helper/test-match-trees.c')
0 files changed, 0 insertions, 0 deletions