[PATCH] Make format-patch --suffix="" not add any suffix

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Brian Gernhardt
Date: Wednesday, January 17, 2007 - 1:22 pm

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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] Add a suffix option to git-format-patch, Josh Boyer, (Wed Jan 17, 6:10 am)
Re: [RFC] Add a suffix option to git-format-patch, Johannes Schindelin, (Wed Jan 17, 6:49 am)
Re: [RFC] Add a suffix option to git-format-patch, Josh Boyer, (Wed Jan 17, 7:50 am)
Re: [RFC] Add a suffix option to git-format-patch, Horst H. von Brand, (Wed Jan 17, 9:39 am)
[PATCH] Introduce 'git-format-patch --suffix=patch', Junio C Hamano, (Wed Jan 17, 12:18 pm)
Re: [PATCH] Introduce 'git-format-patch --suffix=patch', Andy Whitcroft, (Wed Jan 17, 12:20 pm)
Re: [PATCH] Introduce 'git-format-patch --suffix=patch', Junio C Hamano, (Wed Jan 17, 12:27 pm)
Re: [PATCH] Introduce 'git-format-patch --suffix=patch', Brian Gernhardt, (Wed Jan 17, 12:51 pm)
Re: [PATCH] Introduce 'git-format-patch --suffix=patch', Junio C Hamano, (Wed Jan 17, 12:57 pm)
Re: [PATCH] Introduce 'git-format-patch --suffix=patch', Brian Gernhardt, (Wed Jan 17, 1:08 pm)
[PATCH] Make format-patch --suffix="" not add any suffix, Brian Gernhardt, (Wed Jan 17, 1:22 pm)
Re: [PATCH] Introduce 'git-format-patch --suffix=patch', Johannes Schindelin, (Wed Jan 17, 6:11 pm)