string_list: Fix argument order for for_each_string_list
Update the definition and callers of for_each_string_list to use the string_list as the first argument. This helps make the string_list API easier to use by being more consistent. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
cb944f6b50
commit
b684e97736
6
notes.c
6
notes.c
@ -969,7 +969,7 @@ struct notes_tree **load_notes_trees(struct string_list *refs)
|
||||
trees = xmalloc((refs->nr+1) * sizeof(struct notes_tree *));
|
||||
cb_data.counter = 0;
|
||||
cb_data.trees = trees;
|
||||
for_each_string_list(load_one_display_note_ref, refs, &cb_data);
|
||||
for_each_string_list(refs, load_one_display_note_ref, &cb_data);
|
||||
trees[cb_data.counter] = NULL;
|
||||
return trees;
|
||||
}
|
||||
@ -996,8 +996,8 @@ void init_display_notes(struct display_notes_opt *opt)
|
||||
git_config(notes_display_config, &load_config_refs);
|
||||
|
||||
if (opt && opt->extra_notes_refs)
|
||||
for_each_string_list(string_list_add_refs_from_list,
|
||||
opt->extra_notes_refs,
|
||||
for_each_string_list(opt->extra_notes_refs,
|
||||
string_list_add_refs_from_list,
|
||||
&display_notes_refs);
|
||||
|
||||
display_notes_trees = load_notes_trees(&display_notes_refs);
|
||||
|
Reference in New Issue
Block a user