Merge branch 'en/ort-perf-batch-12'

More fix-ups and optimization to "merge -sort".

* en/ort-perf-batch-12:
  merge-ort: miscellaneous touch-ups
  Fix various issues found in comments
  diffcore-rename: avoid unnecessary strdup'ing in break_idx
  merge-ort: replace string_list_df_name_compare with faster alternative
This commit is contained in:
Junio C Hamano
2021-07-16 17:42:45 -07:00
3 changed files with 60 additions and 26 deletions

View File

@@ -54,7 +54,7 @@ static void register_rename_src(struct diff_filepair *p)
if (p->broken_pair) {
if (!break_idx) {
break_idx = xmalloc(sizeof(*break_idx));
strintmap_init(break_idx, -1);
strintmap_init_with_options(break_idx, -1, NULL, 0);
}
strintmap_set(break_idx, p->one->path, rename_dst_nr);
}
@@ -1543,7 +1543,7 @@ void diffcore_rename_extended(struct diff_options *options,
/* all the usual ones need to be kept */
diff_q(&outq, p);
else
/* no need to keep unmodified pairs; FIXME: remove earlier? */
/* no need to keep unmodified pairs */
pair_to_free = p;
if (pair_to_free)