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>
This commit is contained in:

committed by
Junio C Hamano

parent
e8c8b7139c
commit
1d2f80fa79
2
remote.c
2
remote.c
@ -1711,7 +1711,7 @@ struct ref *get_stale_heads(struct remote *remote, struct ref *fetch_map)
|
||||
info.ref_names = &ref_names;
|
||||
info.stale_refs_tail = &stale_refs;
|
||||
for (ref = fetch_map; ref; ref = ref->next)
|
||||
string_list_append(ref->name, &ref_names);
|
||||
string_list_append(&ref_names, ref->name);
|
||||
sort_string_list(&ref_names);
|
||||
for_each_ref(get_stale_heads_cb, &info);
|
||||
string_list_clear(&ref_names, 0);
|
||||
|
Reference in New Issue
Block a user