From 78a395d371ec9fd14297178ec98b8b1042a64fb6 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:35 +0100 Subject: string_list: Fix argument order for string_list_insert Update the definition and callers of string_list_insert 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 --- remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'remote.c') diff --git a/remote.c b/remote.c index 0f073e0b5f..7ce714ca2f 100644 --- a/remote.c +++ b/remote.c @@ -778,7 +778,7 @@ void ref_remove_duplicates(struct ref *ref_map) continue; } - item = string_list_insert(ref_map->peer_ref->name, &refs); + item = string_list_insert(&refs, ref_map->peer_ref->name); item->util = ref_map; } string_list_clear(&refs, 0); -- cgit v1.2.1 From e8c8b7139c87c3e3017d3bff07f91c4349850d58 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:37 +0100 Subject: string_list: Fix argument order for string_list_lookup Update the definition and callers of string_list_lookup 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 --- remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'remote.c') diff --git a/remote.c b/remote.c index 7ce714ca2f..5a65838115 100644 --- a/remote.c +++ b/remote.c @@ -763,7 +763,7 @@ void ref_remove_duplicates(struct ref *ref_map) if (!ref_map->peer_ref) continue; - item = string_list_lookup(ref_map->peer_ref->name, &refs); + item = string_list_lookup(&refs, ref_map->peer_ref->name); if (item) { if (strcmp(((struct ref *)item->util)->name, ref_map->name)) -- cgit v1.2.1 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 --- remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'remote.c') diff --git a/remote.c b/remote.c index 5a65838115..9f0c6ef8f5 100644 --- a/remote.c +++ b/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); -- cgit v1.2.1