diff options
author | Julian Phillips <julian@quantumfyre.co.uk> | 2010-06-26 00:41:37 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-27 10:06:51 -0700 |
commit | e8c8b7139c87c3e3017d3bff07f91c4349850d58 (patch) | |
tree | b9de12fa2da7003bf851889938d22c99ad0d1c6b /merge-recursive.c | |
parent | aadceea641806b363ca555ffdc04109ea716c497 (diff) | |
download | git-e8c8b7139c87c3e3017d3bff07f91c4349850d58.tar.gz |
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 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 5e60f4ba22..856e98c083 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -294,7 +294,7 @@ static struct string_list *get_unmerged(void) if (!ce_stage(ce)) continue; - item = string_list_lookup(ce->name, unmerged); + item = string_list_lookup(unmerged, ce->name); if (!item) { item = string_list_insert(unmerged, ce->name); item->util = xcalloc(1, sizeof(struct stage_data)); @@ -356,14 +356,14 @@ static struct string_list *get_renames(struct merge_options *o, re = xmalloc(sizeof(*re)); re->processed = 0; re->pair = pair; - item = string_list_lookup(re->pair->one->path, entries); + item = string_list_lookup(entries, re->pair->one->path); if (!item) re->src_entry = insert_stage_data(re->pair->one->path, o_tree, a_tree, b_tree, entries); else re->src_entry = item->util; - item = string_list_lookup(re->pair->two->path, entries); + item = string_list_lookup(entries, re->pair->two->path); if (!item) re->dst_entry = insert_stage_data(re->pair->two->path, o_tree, a_tree, b_tree, entries); @@ -988,7 +988,7 @@ static int process_renames(struct merge_options *o, output(o, 1, "Adding as %s instead", new_path); update_file(o, 0, dst_other.sha1, dst_other.mode, new_path); } - } else if ((item = string_list_lookup(ren1_dst, renames2Dst))) { + } else if ((item = string_list_lookup(renames2Dst, ren1_dst))) { ren2 = item->util; clean_merge = 0; ren2->processed = 1; |