aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-07-14 15:36:06 +0700
committerJunio C Hamano <gitster@pobox.com>2013-07-15 10:56:09 -0700
commit5c6933d201fab183a9779dca0fe43bf2f1eca098 (patch)
treef22da1c0e6a14ef6cc6cc8cfe824bbdb971aeb48 /builtin
parent341003e715c9a7c0332d3f8f08c2f3696a057565 (diff)
downloadgit-5c6933d201fab183a9779dca0fe43bf2f1eca098.tar.gz
git-5c6933d201fab183a9779dca0fe43bf2f1eca098.tar.xz
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/add.c2
-rw-r--r--builtin/diff.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 0b80fa895..663ddd122 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -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;
diff --git a/builtin/diff.c b/builtin/diff.c
index bb84ba0e4..2fb8c5dc0 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -368,7 +368,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
}
if (rev.prune_data.nr) {
/* builtin_diff_b_f() */
- GUARD_PATHSPEC(&rev.prune_data, PATHSPEC_FROMTOP);
+ GUARD_PATHSPEC(&rev.prune_data, PATHSPEC_FROMTOP | PATHSPEC_LITERAL);
if (!path)
path = rev.prune_data.items[0].match;
paths += rev.prune_data.nr;