From 1d2f80fa79cdc6f7f4fa1cefb47d7d19be3bc5ee Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:38 +0100 Subject: string_list: Fix argument order for string_list_append Update the definition and callers of string_list_append 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 Signed-off-by: Junio C Hamano --- notes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'notes.c') diff --git a/notes.c b/notes.c index 70170db918..4a541e4371 100644 --- a/notes.c +++ b/notes.c @@ -838,7 +838,7 @@ static int string_list_add_one_ref(const char *path, const unsigned char *sha1, { struct string_list *refs = cb; if (!unsorted_string_list_has_string(refs, path)) - string_list_append(path, refs); + string_list_append(refs, path); return 0; } @@ -851,7 +851,7 @@ void string_list_add_refs_by_glob(struct string_list *list, const char *glob) if (get_sha1(glob, sha1)) warning("notes ref %s is invalid", glob); if (!unsorted_string_list_has_string(list, glob)) - string_list_append(glob, list); + string_list_append(list, glob); } } @@ -983,7 +983,7 @@ void init_display_notes(struct display_notes_opt *opt) assert(!display_notes_trees); if (!opt || !opt->suppress_default_notes) { - string_list_append(default_notes_ref(), &display_notes_refs); + string_list_append(&display_notes_refs, default_notes_ref()); display_ref_env = getenv(GIT_NOTES_DISPLAY_REF_ENVIRONMENT); if (display_ref_env) { string_list_add_refs_from_colon_sep(&display_notes_refs, -- cgit v1.2.3