aboutsummaryrefslogtreecommitdiff
path: root/notes.c
diff options
context:
space:
mode:
authorJulian Phillips <julian@quantumfyre.co.uk>2010-06-26 00:41:38 +0100
committerJunio C Hamano <gitster@pobox.com>2010-06-27 10:06:52 -0700
commit1d2f80fa79cdc6f7f4fa1cefb47d7d19be3bc5ee (patch)
treeddad96762347505bb9b455b2e891f74b0b320f99 /notes.c
parente8c8b7139c87c3e3017d3bff07f91c4349850d58 (diff)
downloadgit-1d2f80fa79cdc6f7f4fa1cefb47d7d19be3bc5ee.tar.gz
git-1d2f80fa79cdc6f7f4fa1cefb47d7d19be3bc5ee.tar.xz
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 <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 70170db91..4a541e437 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,