diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-07-14 15:36:07 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-15 10:56:09 -0700 |
commit | a16bf9dd745a9e43e46d745d850db49358430e46 (patch) | |
tree | 695984bd7293ae822c6e9de91a059b0d6e1c9934 /pathspec.c | |
parent | 5c6933d201fab183a9779dca0fe43bf2f1eca098 (diff) | |
download | git-a16bf9dd745a9e43e46d745d850db49358430e46.tar.gz |
pathspec: make --literal-pathspecs disable pathspec magic
--literal-pathspecs and its equivalent environment variable are
probably used for scripting. In that setting, pathspec magic may be
unwanted. Disabling globbing in individual pathspec can be done via
:(literal) magic.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pathspec.c')
-rw-r--r-- | pathspec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pathspec.c b/pathspec.c index 6a16938cb6..b6d8e74277 100644 --- a/pathspec.c +++ b/pathspec.c @@ -103,7 +103,7 @@ static unsigned prefix_pathspec(struct pathspec_item *item, if (literal_global) global_magic |= PATHSPEC_LITERAL; - if (elt[0] != ':') { + if (elt[0] != ':' || literal_global) { ; /* nothing to do */ } else if (elt[1] == '(') { /* longhand */ |