mirror of
https://github.com/git/git.git
synced 2026-01-10 18:20:27 +00:00
Merge branch 'ab/struct-init'
Code cleanup around struct_type_init() functions.
* ab/struct-init:
string-list.h users: change to use *_{nodup,dup}()
string-list.[ch]: add a string_list_init_{nodup,dup}()
dir.[ch]: replace dir_init() with DIR_INIT
*.c *_init(): define in terms of corresponding *_INIT macro
*.h: move some *_INIT to designated initializers
This commit is contained in:
@@ -121,7 +121,7 @@ static void dir_rename_entry_init(struct dir_rename_entry *entry,
|
||||
entry->dir = directory;
|
||||
entry->non_unique_new_dir = 0;
|
||||
strbuf_init(&entry->new_dir, 0);
|
||||
string_list_init(&entry->possible_new_dirs, 0);
|
||||
string_list_init_nodup(&entry->possible_new_dirs);
|
||||
}
|
||||
|
||||
struct collision_entry {
|
||||
@@ -3710,7 +3710,7 @@ static int merge_start(struct merge_options *opt, struct tree *head)
|
||||
}
|
||||
|
||||
CALLOC_ARRAY(opt->priv, 1);
|
||||
string_list_init(&opt->priv->df_conflict_file_set, 1);
|
||||
string_list_init_dup(&opt->priv->df_conflict_file_set);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user