Merge branch 'jp/string-list-api-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Wed, 30 Jun 2010 18:55:38 +0000 (11:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Jun 2010 18:55:38 +0000 (11:55 -0700)
* 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

15 files changed:
1  2 
builtin/apply.c
builtin/commit.c
builtin/fetch.c
builtin/fmt-merge-msg.c
builtin/log.c
builtin/ls-files.c
builtin/receive-pack.c
builtin/remote.c
builtin/rerere.c
http-backend.c
notes.c
remote.c
rerere.c
revision.c
wt-status.c

diff --cc builtin/apply.c
Simple merge
Simple merge
diff --cc builtin/fetch.c
Simple merge
Simple merge
diff --cc builtin/log.c
Simple merge
index 080404769365fef8176c75fff5f526cf6138df6a,3eeacdc6999249983e68add8a6c5745df90c647b..1b9b8a8b4ac2baff6b9676bcf23b148f147dac6a
@@@ -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;
  
Simple merge
index 0a52667e0f7cc14d3a760bf0ec5f6857a0ce9051,03d90cde024967f56af53122ba2b1ca175a83566..6699bc571235167f5cae60106522c09a10ae341d
@@@ -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;
        }
  
Simple merge
diff --cc http-backend.c
index 44ce6bb32b0e98681f7c523537082065e8cb5fc1,8ec15f99c05cbdcc432cce95bdf1b6a45347368d..14c90c2e84afd9997e1a6453f0065b3f59b32e57
@@@ -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;
diff --cc notes.c
Simple merge
diff --cc remote.c
Simple merge
diff --cc rerere.c
Simple merge
diff --cc revision.c
Simple merge
diff --cc wt-status.c
Simple merge