diff options
author | Elijah Newren <newren@gmail.com> | 2021-03-20 00:03:44 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-20 12:35:39 -0700 |
commit | 72b3091040f8d2784225527ebecfc3c2a56fe196 (patch) | |
tree | e6981e254a36a9aa98d8623dc6b2543de08cb099 /pack-revindex.h | |
parent | diffcore-rename: determine which relevant_sources are no longer relevant (diff) | |
download | tgif-72b3091040f8d2784225527ebecfc3c2a56fe196.tar.xz |
merge-ort: use STABLE_QSORT instead of QSORT where required
rename/rename conflict handling depends on the fact that if both sides
renamed the same path, that the one on the MERGE_SIDE1 will appear first
in the combined diff_queue_struct passed to process_renames(). Since we
add all pairs from MERGE_SIDE1 to combined first, and then all pairs
from MERGE_SIDE2, and then sort based on filename, this will only be
true if the sort used is stable. This was found due to the fact that
Mac, unlike Linux, apparently has a system-defined qsort that is not
stable.
While we are at it, review the other callers of QSORT and add comments
about why they can remain as calls to QSORT instead of being modified
to call STABLE_QSORT.
Signed-off-by: Elijah Newren <newren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-revindex.h')
0 files changed, 0 insertions, 0 deletions