diff options
author | Julian Phillips <julian@quantumfyre.co.uk> | 2010-06-26 00:41:35 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-27 10:06:51 -0700 |
commit | 78a395d371ec9fd14297178ec98b8b1042a64fb6 (patch) | |
tree | f155b25e547c4c454f5ff1fd0f21398eb27887ee /builtin/remote.c | |
parent | b684e977363ee5cb53d83c69f2298d7898c5f89a (diff) | |
download | git-78a395d371ec9fd14297178ec98b8b1042a64fb6.tar.gz git-78a395d371ec9fd14297178ec98b8b1042a64fb6.tar.xz |
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 <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r-- | builtin/remote.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index 67a3b4ac4..7e9299cfc 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -251,7 +251,7 @@ static int config_read_branches(const char *key, const char *value, void *cb) } else return 0; - item = string_list_insert(name, &branch_list); + item = string_list_insert(&branch_list, name); if (!item->util) item->util = xcalloc(sizeof(struct branch_info), 1); @@ -870,7 +870,7 @@ static int add_remote_to_show_info(struct string_list_item *item, void *cb_data) int n = strlen(item->string); if (n > info->width) info->width = n; - string_list_insert(item->string, info->list); + string_list_insert(info->list, item->string); return 0; } @@ -917,7 +917,7 @@ static int add_local_to_show_info(struct string_list_item *branch_item, void *cb if (branch_info->rebase) show_info->any_rebase = 1; - item = string_list_insert(branch_item->string, show_info->list); + item = string_list_insert(show_info->list, branch_item->string); item->util = branch_info; return 0; |