summaryrefslogtreecommitdiff
path: root/notes.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-30 11:55:38 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-30 11:55:38 -0700
commita53deac89eb6c65cd953c730f33b86ac3f72d647 (patch)
tree69394607c1f6b8a0c5c53207a747fe31d79f0c79 /notes.c
parent6296062285e07051a5a46cbbd74c67a10bf2ac16 (diff)
parent1d2f80fa79cdc6f7f4fa1cefb47d7d19be3bc5ee (diff)
downloadgit-a53deac89eb6c65cd953c730f33b86ac3f72d647.tar.gz
Merge branch 'jp/string-list-api-cleanup'
* jp/string-list-api-cleanup: string_list: Fix argument order for string_list_append string_list: Fix argument order for string_list_lookup string_list: Fix argument order for string_list_insert_at_index string_list: Fix argument order for string_list_insert string_list: Fix argument order for for_each_string_list string_list: Fix argument order for print_string_list
Diffstat (limited to 'notes.c')
-rw-r--r--notes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/notes.c b/notes.c
index 30d6ded78e..1978244398 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);
}
}
@@ -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;
}
@@ -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,
@@ -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);