[fr] update french translation 2210/2210
[gitweb.git] / builtin / add.c
index d7e3e44d06cdf56ac661600788cfdf751037226e..2a2722fa10aa981695b21984e7c425c35b4f18d0 100644 (file)
@@ -540,10 +540,13 @@ int cmd_add(int argc, const char **argv, const char *prefix)
                               PATHSPEC_FROMTOP |
                               PATHSPEC_LITERAL |
                               PATHSPEC_GLOB |
-                              PATHSPEC_ICASE);
+                              PATHSPEC_ICASE |
+                              PATHSPEC_EXCLUDE);
 
                for (i = 0; i < pathspec.nr; i++) {
                        const char *path = pathspec.items[i].match;
+                       if (pathspec.items[i].magic & PATHSPEC_EXCLUDE)
+                               continue;
                        if (!seen[i] && path[0] &&
                            ((pathspec.items[i].magic &
                              (PATHSPEC_GLOB | PATHSPEC_ICASE)) ||