diff options
| author | Julian Phillips <julian@quantumfyre.co.uk> | 2010-06-26 00:41:39 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2010-06-27 10:17:18 -0700 |
| commit | 0c72cead8435b2865efc884060bd0bd49313cbd5 (patch) | |
| tree | 85fe1fa29a3e80661746ca3d223bd016d0cb869e /notes.c | |
| parent | t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script (diff) | |
| parent | string_list: Fix argument order for string_list_append (diff) | |
| download | git-0c72cead8435b2865efc884060bd0bd49313cbd5.tar.gz git-0c72cead8435b2865efc884060bd0bd49313cbd5.zip | |
Merge branch 'jp/string-list-api-cleanup' into jn/grep-open
An evil merge to adjust the series to cleaned-up API.
From: Julian Phillips <julian@quantumfyre.co.uk>
Subject: [PATCH v2 7/7] grep: fix string_list_append calls
Date: Sat, 26 Jun 2010 00:41:39 +0100
Message-ID: <20100625234140.18927.35025.julian@quantumfyre.co.uk>
* 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
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); |
