format-patch: use stdout directly
[gitweb.git] / builtin / log.c
index caa9fe84a36862876d3eef52a5280a53d0a6050e..1a6903b3f0e1d525898188355c5aac1193076ee5 100644 (file)
@@ -805,7 +805,6 @@ static int git_format_config(const char *var, const char *value, void *cb)
        return git_log_config(var, value, cb);
 }
 
-static FILE *realstdout = NULL;
 static const char *output_directory = NULL;
 static int outdir_offset;
 
@@ -831,7 +830,7 @@ static int open_next_file(struct commit *commit, const char *subject,
                fmt_output_subject(&filename, subject, rev);
 
        if (!quiet)
-               fprintf(realstdout, "%s\n", filename.buf + outdir_offset);
+               printf("%s\n", filename.buf + outdir_offset);
 
        if ((rev->diffopt.file = fopen(filename.buf, "w")) == NULL)
                return error(_("Cannot open patch file %s"), filename.buf);
@@ -1639,9 +1638,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
                get_patch_ids(&rev, &ids);
        }
 
-       if (!use_stdout)
-               realstdout = xfdopen(xdup(1), "w");
-
        if (prepare_revision_walk(&rev))
                die(_("revision walk setup failed"));
        rev.boundary = 1;