string_list: Fix argument order for string_list_insert
[git/git.git] / builtin / commit.c
index ddf77e4..763fe74 100644 (file)
@@ -212,7 +212,7 @@ static int list_paths(struct string_list *list, const char *with_tree,
                        continue;
                if (!match_pathspec(pattern, ce->name, ce_namelen(ce), 0, m))
                        continue;
-               item = string_list_insert(ce->name, list);
+               item = string_list_insert(list, ce->name);
                if (ce_skip_worktree(ce))
                        item->util = item; /* better a valid pointer than a fake one */
        }