Merge branch 'sp/clip-read-write-to-8mb'
[gitweb.git] / builtin / add.c
index 1dab2464f6bd4c848b3068c3e12df378b0540197..ae0bdc78bbf47094a2f0656ef8f3f561e60dc072 100644 (file)
@@ -309,6 +309,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
 
        argc = setup_revisions(argc, argv, &rev, NULL);
        rev.diffopt.output_format = DIFF_FORMAT_PATCH;
+       rev.diffopt.use_color = 0;
        DIFF_OPT_SET(&rev.diffopt, IGNORE_DIRTY_SUBMODULES);
        out = open(file, O_CREAT | O_WRONLY, 0666);
        if (out < 0)
@@ -544,12 +545,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;