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
@@@ -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
@@@ -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
@@@ -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