Skip to content

Commit

Permalink
builtin/log.c: stop using global patch_suffix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Dec 22, 2012
1 parent ce37596 commit 68cb7b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 68cb7b6

Please sign in to comment.