From 78a395d371ec9fd14297178ec98b8b1042a64fb6 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:35 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- mailmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mailmap.c') diff --git a/mailmap.c b/mailmap.c index b68c1fec9c..badf6a4dad 100644 --- a/mailmap.c +++ b/mailmap.c @@ -92,7 +92,7 @@ static void add_mapping(struct string_list *map, mi->name = xstrdup(new_name); if (new_email) mi->email = xstrdup(new_email); - string_list_insert(old_name, &me->namemap)->util = mi; + string_list_insert(&me->namemap, old_name)->util = mi; } debug_mm("mailmap: '%s' <%s> -> '%s' <%s>\n", -- cgit v1.2.3 From aadceea641806b363ca555ffdc04109ea716c497 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:36 +0100 Subject: string_list: Fix argument order for string_list_insert_at_index Update the definition and callers of string_list_insert_at_index 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 Signed-off-by: Junio C Hamano --- mailmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mailmap.c') diff --git a/mailmap.c b/mailmap.c index badf6a4dad..8b6dc36bbc 100644 --- a/mailmap.c +++ b/mailmap.c @@ -69,7 +69,7 @@ static void add_mapping(struct string_list *map, index = -1 - index; } else { /* create mailmap entry */ - struct string_list_item *item = string_list_insert_at_index(index, old_email, map); + struct string_list_item *item = string_list_insert_at_index(map, index, old_email); item->util = xmalloc(sizeof(struct mailmap_entry)); memset(item->util, 0, sizeof(struct mailmap_entry)); ((struct mailmap_entry *)item->util)->namemap.strdup_strings = 1; -- cgit v1.2.3 From e8c8b7139c87c3e3017d3bff07f91c4349850d58 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:37 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- mailmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mailmap.c') diff --git a/mailmap.c b/mailmap.c index 8b6dc36bbc..f80b701292 100644 --- a/mailmap.c +++ b/mailmap.c @@ -214,13 +214,13 @@ int map_user(struct string_list *map, mailbuf[i] = 0; debug_mm("map_user: map '%s' <%s>\n", name, mailbuf); - item = string_list_lookup(mailbuf, map); + item = string_list_lookup(map, mailbuf); if (item != NULL) { me = (struct mailmap_entry *)item->util; if (me->namemap.nr) { /* The item has multiple items, so we'll look up on name too */ /* If the name is not found, we choose the simple entry */ - struct string_list_item *subitem = string_list_lookup(name, &me->namemap); + struct string_list_item *subitem = string_list_lookup(&me->namemap, name); if (subitem) item = subitem; } -- cgit v1.2.3