From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 3/7] builtin/log.c: stop using global patch_suffix
Date: Sat, 22 Dec 2012 00:33:28 -0800 [thread overview]
Message-ID: <1356165212-5611-4-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1356165212-5611-1-git-send-email-gitster@pobox.com>
The suffix for the output filename is found in rev->patch_suffix; do
not keep using the global that is only used to parse the command
line and configuration.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
builtin/log.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index f1d086e..7cf157e 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -673,7 +673,7 @@ static int reopen_stdout(struct commit *commit, const char *subject,
struct rev_info *rev, int quiet)
{
struct strbuf filename = STRBUF_INIT;
- int suffix_len = strlen(fmt_patch_suffix) + 1;
+ int suffix_len = strlen(rev->patch_suffix) + 1;
if (output_directory) {
strbuf_addstr(&filename, output_directory);
@@ -684,7 +684,7 @@ static int reopen_stdout(struct commit *commit, const char *subject,
strbuf_addch(&filename, '/');
}
- get_patch_filename(commit, subject, rev->nr, fmt_patch_suffix, &filename);
+ get_patch_filename(commit, subject, rev->nr, rev->patch_suffix, &filename);
if (!quiet)
fprintf(realstdout, "%s\n", filename.buf + outdir_offset);
--
1.8.0.6.gd28b5d4.dirty
next prev parent reply other threads:[~2012-12-22 8:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-22 8:33 [PATCH 0/7] format-patch --reroll-count Junio C Hamano
2012-12-22 8:33 ` [PATCH 1/7] builtin/log.c: drop unused "numbered" parameter from make_cover_letter() Junio C Hamano
2012-12-22 8:33 ` [PATCH 2/7] builtin/log.c: drop redundant "numbered_files" " Junio C Hamano
2012-12-22 8:33 ` Junio C Hamano [this message]
2012-12-22 8:33 ` [PATCH 4/7] get_patch_filename(): simplify function signature Junio C Hamano
2012-12-22 8:33 ` [PATCH 5/7] get_patch_filename(): drop "just-numbers" hack Junio C Hamano
2012-12-22 8:33 ` [PATCH 6/7] get_patch_filename(): split into two functions Junio C Hamano
2012-12-22 8:33 ` [PATCH 7/7] format-patch: add --reroll-count=$N option Junio C Hamano
2013-01-01 3:04 ` [PATCH 0/7] format-patch --reroll-count Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1356165212-5611-4-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).