Skip to content

Commit f14883b

Browse files
committed
Merge branch 'rs/merge-recursive-string-list-init' into maint
A small code clean-up. * rs/merge-recursive-string-list-init: merge-recursive: use STRING_LIST_INIT_NODUP
2 parents 24c88ad + af4941d commit f14883b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

merge-recursive.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static void record_df_conflict_files(struct merge_options *o,
406406
* and the file need to be present, then the D/F file will be
407407
* reinstated with a new unique name at the time it is processed.
408408
*/
409-
struct string_list df_sorted_entries;
409+
struct string_list df_sorted_entries = STRING_LIST_INIT_NODUP;
410410
const char *last_file = NULL;
411411
int last_len = 0;
412412
int i;
@@ -419,7 +419,6 @@ static void record_df_conflict_files(struct merge_options *o,
419419
return;
420420

421421
/* Ensure D/F conflicts are adjacent in the entries list. */
422-
memset(&df_sorted_entries, 0, sizeof(struct string_list));
423422
for (i = 0; i < entries->nr; i++) {
424423
struct string_list_item *next = &entries->items[i];
425424
string_list_append(&df_sorted_entries, next->string)->util =

0 commit comments

Comments
 (0)