Code

add -e: do not show difference in a submodule that is merely dirty
[git.git] / builtin / add.c
index c59b0c98fefefc413c8330715fffcc83142d5b2d..68fd050e94586b15ac720e415f8026ef2f62f7d1 100644 (file)
@@ -279,6 +279,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;
+       DIFF_OPT_SET(&rev.diffopt, IGNORE_DIRTY_SUBMODULES);
        out = open(file, O_CREAT | O_WRONLY, 0644);
        if (out < 0)
                die (_("Could not open '%s' for writing."), file);