diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-05 14:11:11 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-05 14:11:20 -0800 |
commit | 15a42a10ec71eb18983750562a2a8a43b224fef0 (patch) | |
tree | 2c208dd06917ffc4361cee469bfd3d9b7e5405cb /pathspec.c | |
parent | bb5d531efa804bbf09064e4a7ce65e096599f3c7 (diff) | |
parent | d2446dfd7f3b3f8948142cfb07a0270e2497d93f (diff) | |
download | git-jk/remove-deprecated.tar.gz |
Sync with 1.8.5jk/remove-deprecated
Diffstat (limited to 'pathspec.c')
-rw-r--r-- | pathspec.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pathspec.c b/pathspec.c index ad1a9f5b28..4cf2bd365a 100644 --- a/pathspec.c +++ b/pathspec.c @@ -128,7 +128,11 @@ static unsigned prefix_pathspec(struct pathspec_item *item, die(_("global 'literal' pathspec setting is incompatible " "with all other global pathspec settings")); - if (elt[0] != ':' || literal_global) { + if (flags & PATHSPEC_LITERAL_PATH) + global_magic = 0; + + if (elt[0] != ':' || literal_global || + (flags & PATHSPEC_LITERAL_PATH)) { ; /* nothing to do */ } else if (elt[1] == '(') { /* longhand */ @@ -405,6 +409,9 @@ void parse_pathspec(struct pathspec *pathspec, item[i].magic = prefix_pathspec(item + i, &short_magic, argv + i, flags, prefix, prefixlen, entry); + if ((flags & PATHSPEC_LITERAL_PATH) && + !(magic_mask & PATHSPEC_LITERAL)) + item[i].magic |= PATHSPEC_LITERAL; if (item[i].magic & magic_mask) unsupported_magic(entry, item[i].magic & magic_mask, |