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>
This commit is contained in:
Julian Phillips
2010-06-26 00:41:35 +01:00
committed by Junio C Hamano
parent b684e97736
commit 78a395d371
19 changed files with 40 additions and 40 deletions

View File

@ -20,7 +20,7 @@ void record_resolve_undo(struct index_state *istate, struct cache_entry *ce)
istate->resolve_undo = resolve_undo;
}
resolve_undo = istate->resolve_undo;
lost = string_list_insert(ce->name, resolve_undo);
lost = string_list_insert(resolve_undo, ce->name);
if (!lost->util)
lost->util = xcalloc(1, sizeof(*ui));
ui = lost->util;
@ -70,7 +70,7 @@ struct string_list *resolve_undo_read(const char *data, unsigned long size)
len = strlen(data) + 1;
if (size <= len)
goto error;
lost = string_list_insert(data, resolve_undo);
lost = string_list_insert(resolve_undo, data);
if (!lost->util)
lost->util = xcalloc(1, sizeof(*ui));
ui = lost->util;