pathspec: support :(literal) syntax for noglob pathspec

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:36:06 +07:00
committed by Junio C Hamano
parent 341003e715
commit 5c6933d201
9 changed files with 64 additions and 15 deletions

View File

@ -541,7 +541,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
/*
* file_exists() assumes exact match
*/
GUARD_PATHSPEC(&pathspec, PATHSPEC_FROMTOP);
GUARD_PATHSPEC(&pathspec, PATHSPEC_FROMTOP | PATHSPEC_LITERAL);
for (i = 0; i < pathspec.nr; i++) {
const char *path = pathspec.items[i].match;