diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2016-11-24 18:45:36 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-11-28 15:30:17 -0800 |
commit | fa6ca11105ccb46b785fd4ed58c333d5ad7f1774 (patch) | |
tree | 12367cdeb454f55591ec88b59f91e53a7c62e529 /t/t5547-push-quarantine.sh | |
parent | Git 2.10.2 (diff) | |
download | tgif-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/t5547-push-quarantine.sh')
0 files changed, 0 insertions, 0 deletions