diff options
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/builtin/log.c b/builtin/log.c index 6696c4cfd0..3ac479bec3 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1896,6 +1896,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) rev.diff = 1; rev.max_parents = 1; rev.diffopt.flags.recursive = 1; + rev.diffopt.no_free = 1; rev.subject_prefix = fmt_patch_subject_prefix; memset(&s_r_opt, 0, sizeof(s_r_opt)); s_r_opt.def = "HEAD"; @@ -2021,13 +2022,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) if (use_stdout) { setup_pager(); - } else if (rev.diffopt.close_file) { - /* - * The diff code parsed --output; it has already opened the - * file, but we must instruct it not to close after each diff. - */ - rev.diffopt.no_free = 1; - } else { + } else if (!rev.diffopt.close_file) { int saved; if (!output_directory) |