summaryrefslogtreecommitdiff
path: root/notes.c
diff options
context:
space:
mode:
authorJulian Phillips <julian@quantumfyre.co.uk>2010-06-26 00:41:34 +0100
committerJunio C Hamano <gitster@pobox.com>2010-06-27 10:06:51 -0700
commitb684e977363ee5cb53d83c69f2298d7898c5f89a (patch)
treeb5f70daef883213e3f69643113601cc07e872083 /notes.c
parentcb944f6b5009e4788041a5194d73b92a0620c9d9 (diff)
downloadgit-b684e977363ee5cb53d83c69f2298d7898c5f89a.tar.gz
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>
Diffstat (limited to 'notes.c')
-rw-r--r--notes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/notes.c b/notes.c
index e425e19827..70170db918 100644
--- a/notes.c
+++ b/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);