grep -O: Do not pass color sequences as filenames to pager
[gitweb.git] / builtin / commit.c
index ddf77e48e1d9fa1e6db0ac49008857b85a9b5e41..763fe74b905f28a2061fa1da16b935d3bf4d5fd4 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 */
        }