aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJulian Phillips <julian@quantumfyre.co.uk>2010-06-26 00:41:37 +0100
committerJunio C Hamano <gitster@pobox.com>2010-06-27 10:06:51 -0700
commite8c8b7139c87c3e3017d3bff07f91c4349850d58 (patch)
treeb9de12fa2da7003bf851889938d22c99ad0d1c6b /builtin
parentaadceea641806b363ca555ffdc04109ea716c497 (diff)
downloadgit-e8c8b7139c87c3e3017d3bff07f91c4349850d58.tar.gz
git-e8c8b7139c87c3e3017d3bff07f91c4349850d58.tar.xz
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 <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/apply.c2
-rw-r--r--builtin/fetch.c4
-rw-r--r--builtin/receive-pack.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 57151225f..cf92f12a1 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -2628,7 +2628,7 @@ static struct patch *in_fn_table(const char *name)
if (name == NULL)
return NULL;
- item = string_list_lookup(name, &fn_table);
+ item = string_list_lookup(&fn_table, name);
if (item != NULL)
return (struct patch *)item->util;
diff --git a/builtin/fetch.c b/builtin/fetch.c
index e4296ab3b..9165bb605 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -695,8 +695,8 @@ static int do_fetch(struct transport *transport,
for (rm = ref_map; rm; rm = rm->next) {
if (rm->peer_ref) {
- peer_item = string_list_lookup(rm->peer_ref->name,
- &existing_refs);
+ peer_item = string_list_lookup(&existing_refs,
+ rm->peer_ref->name);
if (peer_item)
hashcpy(rm->peer_ref->old_sha1,
peer_item->util);
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index bb34757d2..8b5a4656e 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -501,7 +501,7 @@ static void check_aliased_update(struct command *cmd, struct string_list *list)
if (!(flag & REF_ISSYMREF))
return;
- if ((item = string_list_lookup(dst_name, list)) == NULL)
+ if ((item = string_list_lookup(list, dst_name)) == NULL)
return;
cmd->skip_update = 1;