@@ -390,12 +390,10 @@ static struct string_list *get_unmerged(void)
390390 return unmerged ;
391391}
392392
393- static int string_list_df_name_compare (const void * a , const void * b )
393+ static int string_list_df_name_compare (const char * one , const char * two )
394394{
395- const struct string_list_item * one = a ;
396- const struct string_list_item * two = b ;
397- int onelen = strlen (one -> string );
398- int twolen = strlen (two -> string );
395+ int onelen = strlen (one );
396+ int twolen = strlen (two );
399397 /*
400398 * Here we only care that entries for D/F conflicts are
401399 * adjacent, in particular with the file of the D/F conflict
@@ -408,8 +406,8 @@ static int string_list_df_name_compare(const void *a, const void *b)
408406 * since in other cases any changes in their order due to
409407 * sorting cause no problems for us.
410408 */
411- int cmp = df_name_compare (one -> string , onelen , S_IFDIR ,
412- two -> string , twolen , S_IFDIR );
409+ int cmp = df_name_compare (one , onelen , S_IFDIR ,
410+ two , twolen , S_IFDIR );
413411 /*
414412 * Now that 'foo' and 'foo/bar' compare equal, we have to make sure
415413 * that 'foo' comes before 'foo/bar'.
@@ -453,8 +451,8 @@ static void record_df_conflict_files(struct merge_options *o,
453451 string_list_append (& df_sorted_entries , next -> string )-> util =
454452 next -> util ;
455453 }
456- qsort ( df_sorted_entries .items , entries -> nr , sizeof ( * entries -> items ),
457- string_list_df_name_compare );
454+ df_sorted_entries .cmp = string_list_df_name_compare ;
455+ string_list_sort ( & df_sorted_entries );
458456
459457 string_list_clear (& o -> df_conflict_file_set , 1 );
460458 for (i = 0 ; i < df_sorted_entries .nr ; i ++ ) {
0 commit comments