builtin/log.c: stop using global patch_suffix
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>
Junio C Hamano committed
Dec 21, 2012 at 22:24 UTC
68cb7b6f85aa032c33e49137364da9b76b1d95a1
1 file changed
+2
-2
builtin/log.c
+2
-2
@@ -673,7 +673,7 @@ static int reopen_stdout(struct commit *commit, const char *subject,
673
struct rev_info *rev, int quiet)
674
{
675
struct strbuf filename = STRBUF_INIT;
676
- int suffix_len = strlen(fmt_patch_suffix) + 1;
676
+ int suffix_len = strlen(rev->patch_suffix) + 1;
677
678
if (output_directory) {
679
strbuf_addstr(&filename, output_directory);
@@ -684,7 +684,7 @@ static int reopen_stdout(struct commit *commit, const char *subject,
684
strbuf_addch(&filename, '/');
685
}
686
687
- get_patch_filename(commit, subject, rev->nr, fmt_patch_suffix, &filename);
687
+ get_patch_filename(commit, subject, rev->nr, rev->patch_suffix, &filename);
688
689
if (!quiet)
690
fprintf(realstdout, "%s\n", filename.buf + outdir_offset);