git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
MWMark Wooding <mdw@distorted.org.uk>
Date
Feb 27, 2006, 12:52 UTC
Message-ID
<20060227125252.25144.12278.stgit@metalzone.distorted.org.uk>
In-Reply-To
<20060227124815.25144.83101.stgit@metalzone.distorted.org.uk>
From: Mark Wooding <mdw@distorted.org.uk>

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

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
---
 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)
Previous: Mark Wooding
Message 3 of 3 in “combine-diff consistency fixes”
  1. 0/2 combine-diff consistency fixesMark Wooding, Feb 27, 2006
  2. 1/2 combine-diff: Honour --full-index.Mark Wooding, Feb 27, 2006
  3. 2/2 combine-diff: Honour -z option correctly.Mark Wooding, Feb 27, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.