summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e986ceb)
raw | patch | inline | side by side (parent: e986ceb)
author | Nate Case <ncase@xes-inc.com> | |
Wed, 18 Mar 2009 17:00:45 +0000 (12:00 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 19 Mar 2009 02:09:35 +0000 (19:09 -0700) |
Hide the patch filename output from 'git format-patch' when --quiet
is used. The man pages suggested that this should have already worked.
Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
is used. The man pages suggested that this should have already worked.
Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-log.c | patch | blob | history |
diff --git a/builtin-log.c b/builtin-log.c
index 8684fcdb67fc0216ffc860f60f5c060f10907b83..8af55d28793ae1fb7180198fb4f63eb7783c6335 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
static const char *output_directory = NULL;
static int outdir_offset;
-static int reopen_stdout(const char *oneline, int nr, int total)
+static int reopen_stdout(const char *oneline, int nr, struct rev_info *rev)
{
char filename[PATH_MAX];
int len = 0;
strcpy(filename + len, fmt_patch_suffix);
}
- fprintf(realstdout, "%s\n", filename + outdir_offset);
+ if (!DIFF_OPT_TST(&rev->diffopt, QUIET))
+ fprintf(realstdout, "%s\n", filename + outdir_offset);
+
if (freopen(filename, "w", stdout) == NULL)
return error("Cannot open patch file %s",filename);
die("Cover letter needs email format");
if (!use_stdout && reopen_stdout(numbered_files ?
- NULL : "cover-letter", 0, rev->total))
+ NULL : "cover-letter", 0, rev))
return;
head_sha1 = sha1_to_hex(head->object.sha1);
}
if (!use_stdout && reopen_stdout(numbered_files ? NULL :
get_oneline_for_filename(commit, keep_subject),
- rev.nr, rev.total))
+ rev.nr, &rev))
die("Failed to create output files");
shown = log_tree_commit(&rev, commit);
free(commit->buffer);