parse_pathspec: make sure the prefix part is wildcard-free

Prepending prefix to pathspec is a trick to workaround the fact that
commands can be executed in a subdirectory, but all git commands run
at worktree's root. The prefix part should always be treated as
literal string. Make it so.

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:03 +07:00
committed by Junio C Hamano
parent b3920bbdc5
commit 645a29c40a
5 changed files with 54 additions and 10 deletions

View File

@ -21,7 +21,7 @@ struct pathspec {
const char *match;
const char *original;
unsigned magic;
int len;
int len, prefix;
int nowildcard_len;
int flags;
} *items;