summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorJulian Phillips <julian@quantumfyre.co.uk>2010-06-25 23:41:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-27 17:06:51 (GMT)
commit78a395d371ec9fd14297178ec98b8b1042a64fb6 (patch)
treef155b25e547c4c454f5ff1fd0f21398eb27887ee /builtin/apply.c
parentb684e977363ee5cb53d83c69f2298d7898c5f89a (diff)
downloadgit-78a395d371ec9fd14297178ec98b8b1042a64fb6.zip
git-78a395d371ec9fd14297178ec98b8b1042a64fb6.tar.gz
git-78a395d371ec9fd14297178ec98b8b1042a64fb6.tar.bz2
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 <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 8fc5ec3..5715122 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -2664,7 +2664,7 @@ static void add_to_fn_table(struct patch *patch)
* file creations and copies
*/
if (patch->new_name != NULL) {
- item = string_list_insert(patch->new_name, &fn_table);
+ item = string_list_insert(&fn_table, patch->new_name);
item->util = patch;
}
@@ -2673,7 +2673,7 @@ static void add_to_fn_table(struct patch *patch)
* later chunks shouldn't patch old names
*/
if ((patch->new_name == NULL) || (patch->is_rename)) {
- item = string_list_insert(patch->old_name, &fn_table);
+ item = string_list_insert(&fn_table, patch->old_name);
item->util = PATH_WAS_DELETED;
}
}
@@ -2686,7 +2686,7 @@ static void prepare_fn_table(struct patch *patch)
while (patch) {
if ((patch->new_name == NULL) || (patch->is_rename)) {
struct string_list_item *item;
- item = string_list_insert(patch->old_name, &fn_table);
+ item = string_list_insert(&fn_table, patch->old_name);
item->util = PATH_TO_BE_DELETED;
}
patch = patch->next;