[PATCH] Make format-patch --suffix="" not add any suffix
- From
Brian Gernhardt <benji@silverinsanity.com>
- Date
- Jan 17, 2007, 20:22 UTC
- Message-ID
- <20070117202221.GA14042@176.242.249.10.in-addr.arpa>
- In-Reply-To
- <7v4pqpsbre.fsf_-_@assigned-by-dhcp.cox.net>
Having a suffix of "." when the user explicitly asked for none is somewhat confusing.
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> --- builtin-log.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/builtin-log.c b/builtin-log.c index 04e3144..a60a987 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -276,7 +276,8 @@ static void reopen_stdout(struct commit *commit, int nr, int keep_subject) while (filename[len - 1] == '.' || filename[len - 1] == '-') len--; } - sprintf(filename + len, ".%s", fmt_patch_suffix); + if (fmt_patch_suffix[0] != '\0') + sprintf(filename + len, ".%s", fmt_patch_suffix); fprintf(realstdout, "%s\n", filename); freopen(filename, "w", stdout); }
-- 1.5.0.rc1.gfb138