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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Having a suffix of "." when the user explicitly asked for none is
somewhat confusing.

Signed-off-by: Brian Gernhardt <benji@xxxxxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]