diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-07-14 12:36:09 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-15 23:14:38 +0400 |
commit | 93d935371654faf2956a4c37c1ca46f3195ee832 (patch) | |
tree | 913861fd9f039c86e4f3a8b3ea1b51391d72d05d /builtin/add.c | |
parent | bd30c2e48432c692f9e77d3529c9cf25117066bb (diff) |
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.c | 6 |
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; |