diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index e8a800d3ac42bfce328bea786d8e1efa4ff695c7..7cff175745d680d9cde24280e569b4f513d28673 100644 (file)
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
strip_trailing_slash_from_submodules();
/* Find common prefix for all pathspec's */
- max_prefix = pathspec_prefix(prefix, pathspec);
+ max_prefix = common_prefix(pathspec);
max_prefix_len = max_prefix ? strlen(max_prefix) : 0;
/* Treat unmatching pathspec elements as errors */