Thread (9 messages) flat view 9 messages, 2 authors, 2016-06-15
STALE3731d

[PATCH 3/7] builtin/log.c: stop using global patch_suffix

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:35
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help