Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/log.c: stop using global patch_suffix
author
Junio C Hamano
<gitster@pobox.com>
Sat, 22 Dec 2012 06:24:03 +0000
(22:24 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 22 Dec 2012 07:12:25 +0000
(23:12 -0800)
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
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ce37596
)
diff --git
a/builtin/log.c
b/builtin/log.c
index f1d086e68b1c5100835f05fa1720f7f7b609b867..7cf157e3ea196fb072fe071a7d5a1cc2fd452a0c 100644
(file)
--- 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;
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);
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, '/');
}
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);
if (!quiet)
fprintf(realstdout, "%s\n", filename.buf + outdir_offset);