parse_pathspec: save original pathspec for reporting

We usually use pathspec_item's match field for pathspec error
reporting. However "match" (or "raw") does not show the magic part,
which will play more important role later on. Preserve exact user
input for reporting.

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:29 +07:00
committed by Junio C Hamano
parent 87323bdace
commit d2ce133195
3 changed files with 4 additions and 0 deletions

1
dir.c
View File

@ -1599,6 +1599,7 @@ int init_pathspec(struct pathspec *pathspec, const char **paths)
const char *path = paths[i];
item->match = path;
item->original = path;
item->len = strlen(path);
item->flags = 0;
if (limit_pathspec_to_literal()) {