diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index fb2d5f4b1fb0ce9ef2fb0c4099b5fea6d07b6838..15701233e29b240cfa1abdb56bd489306e74c677 100644 (file)
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
{
struct tree *tree;
unsigned char sha1[20];
- const char **match;
+ struct pathspec pathspec;
struct cache_entry *last_stage0 = NULL;
int i;
static const char *(matchbuf[2]);
matchbuf[0] = prefix;
matchbuf[1] = NULL;
- match = matchbuf;
+ init_pathspec(&pathspec, matchbuf);
+ pathspec.items[0].use_wildcard = 0;
} else
- match = NULL;
- if (read_tree(tree, 1, match))
+ init_pathspec(&pathspec, NULL);
+ if (read_tree(tree, 1, &pathspec))
die("unable to read tree entries %s", tree_name);
for (i = 0; i < active_nr; i++) {