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:
committed by
Junio C Hamano
parent
3efe8e4381
commit
827f4d6c21
@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user