From: Junio C Hamano Date: Wed, 30 Jun 2010 18:55:38 +0000 (-0700) Subject: Merge branch 'jp/string-list-api-cleanup' X-Git-Tag: v1.7.2-rc1~8 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a53deac89eb6c65cd953c730f33b86ac3f72d647;p=git.git Merge branch 'jp/string-list-api-cleanup' * 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 --- a53deac89eb6c65cd953c730f33b86ac3f72d647 diff --cc builtin/ls-files.c index 080404769,3eeacdc69..1b9b8a8b4 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@@ -190,10 -186,10 +190,10 @@@ static void show_ru_info(void { if (!the_index.resolve_undo) return; - for_each_string_list(show_one_ru, the_index.resolve_undo, NULL); + for_each_string_list(the_index.resolve_undo, show_one_ru, NULL); } -static void show_files(struct dir_struct *dir, const char *prefix) +static void show_files(struct dir_struct *dir) { int i; diff --cc builtin/remote.c index 0a52667e0,03d90cde0..6699bc571 --- a/builtin/remote.c +++ b/builtin/remote.c @@@ -181,10 -160,19 +181,10 @@@ static int add(int argc, const char **a strbuf_addf(&buf, "remote.%s.fetch", name); if (track.nr == 0) - string_list_append("*", &track); + string_list_append(&track, "*"); for (i = 0; i < track.nr; i++) { - struct string_list_item *item = track.items + i; - - strbuf_reset(&buf2); - strbuf_addch(&buf2, '+'); - if (mirror) - strbuf_addf(&buf2, "refs/%s:refs/%s", - item->string, item->string); - else - strbuf_addf(&buf2, "refs/heads/%s:refs/remotes/%s/%s", - item->string, name, item->string); - if (git_config_set_multivar(buf.buf, buf2.buf, "^$", 0)) + if (add_branch(buf.buf, track.items[i].string, + name, mirror, &buf2)) return 1; } diff --cc http-backend.c index 44ce6bb32,8ec15f99c..14c90c2e8 --- a/http-backend.c +++ b/http-backend.c @@@ -33,13 -86,13 +33,13 @@@ static struct string_list *get_paramete query_params = xcalloc(1, sizeof(*query_params)); while (query && *query) { - char *name = decode_parameter(&query, 1); - char *value = decode_parameter(&query, 0); + char *name = url_decode_parameter_name(&query); + char *value = url_decode_parameter_value(&query); struct string_list_item *i; - i = string_list_lookup(name, query_params); + i = string_list_lookup(query_params, name); if (!i) - i = string_list_insert(name, query_params); + i = string_list_insert(query_params, name); else free(i->util); i->util = value;