[PATCH 2/2] combine-diff: Honour -z option correctly.

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

 



From: Mark Wooding <mdw@xxxxxxxxxxxxxxxx>

Combined diffs don't null terminate things in the same way as standard
diffs.  This is presumably wrong.

Signed-off-by: Mark Wooding <mdw@xxxxxxxxxxxxxxxx>
---

 combine-diff.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/combine-diff.c b/combine-diff.c
index 984103e..a23894d 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -726,7 +726,7 @@ static int show_patch_diff(struct combin
 
 		if (header) {
 			shown_header++;
-			puts(header);
+			printf("%s%c", header, opt->line_termination);
 		}
 		printf("diff --%s ", dense ? "cc" : "combined");
 		if (quote_c_style(elem->path, NULL, NULL, 0))
@@ -799,7 +799,7 @@ static void show_raw_diff(struct combine
 		inter_name_termination = 0;
 
 	if (header)
-		puts(header);
+		printf("%s%c", header, line_termination);
 
 	for (i = 0; i < num_parent; i++) {
 		if (p->parent[i].mode)
-
: 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]