convert common_prefix() to use struct pathspec

The code now takes advantage of nowildcard_len field.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2013-07-14 15:35:57 +07:00
committed by Junio C Hamano
parent 3efe8e4381
commit 827f4d6c21
4 changed files with 17 additions and 18 deletions

View File

@ -546,7 +546,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
prefix, argv);
/* Find common prefix for all pathspec's */
max_prefix = common_prefix(pathspec.raw);
max_prefix = common_prefix(&pathspec);
max_prefix_len = max_prefix ? strlen(max_prefix) : 0;
/* Treat unmatching pathspec elements as errors */