add: create ADD_EDIT.patch with mode 0666
[gitweb.git] / builtin / add.c
index 1c42900ff8c55a94ccfd1d214567d0f64d615412..d0b915143823aa95235a998fda81b121bb6bd48e 100644 (file)
@@ -280,7 +280,8 @@ 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;
-       out = open(file, O_CREAT | O_WRONLY, 0644);
+       DIFF_OPT_SET(&rev.diffopt, IGNORE_DIRTY_SUBMODULES);
+       out = open(file, O_CREAT | O_WRONLY, 0666);
        if (out < 0)
                die (_("Could not open '%s' for writing."), file);
        rev.diffopt.file = xfdopen(out, "w");