summaryrefslogtreecommitdiff
path: root/builtin/add.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-07-14 15:36:09 +0700
committerJunio C Hamano <gitster@pobox.com>2013-07-15 12:14:38 -0700
commit93d935371654faf2956a4c37c1ca46f3195ee832 (patch)
tree913861fd9f039c86e4f3a8b3ea1b51391d72d05d /builtin/add.c
parentbd30c2e48432c692f9e77d3529c9cf25117066bb (diff)
downloadgit-93d935371654faf2956a4c37c1ca46f3195ee832.tar.gz
parse_pathspec: accept :(icase)path syntax
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/add.c')
-rw-r--r--builtin/add.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 1dab2464f6..9d52fc7915 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -544,12 +544,14 @@ int cmd_add(int argc, const char **argv, const char *prefix)
GUARD_PATHSPEC(&pathspec,
PATHSPEC_FROMTOP |
PATHSPEC_LITERAL |
- PATHSPEC_GLOB);
+ PATHSPEC_GLOB |
+ PATHSPEC_ICASE);
for (i = 0; i < pathspec.nr; i++) {
const char *path = pathspec.items[i].match;
if (!seen[i] &&
- ((pathspec.items[i].magic & PATHSPEC_GLOB) ||
+ ((pathspec.items[i].magic &
+ (PATHSPEC_GLOB | PATHSPEC_ICASE)) ||
!file_exists(path))) {
if (ignore_missing) {
int dtype = DT_UNKNOWN;