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

[PATCH] Separate the raw diff and patch with a newline

From
Petr Baudis <pasky@suse.cz>
Date
Apr 11, 2006, 11:30 UTC
Message-ID
<20060411113045.12117.10948.stgit@machine.or.cz>
In-Reply-To
<7vr7456jb4.fsf@assigned-by-dhcp.cox.net>

More friendly for human reading I believe, and possibly friendlier to some parsers (although only by an epsilon).

Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 combine-diff.c |    1 +
 diff.c         |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/combine-diff.c b/combine-diff.c
index 748dc30..0e25788 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -867,6 +867,7 @@ const char *diff_tree_combined_merge(con
 					header = NULL;
 			}
 			opt->output_format = DIFF_FORMAT_PATCH;
+			putchar(opt->line_termination);
 		}
 		for (p = paths; p; p = p->next) {
 			if (show_combined_diff(p, num_parent, dense,
diff --git a/diff.c b/diff.c
index 00c79aa..86e4251 100644
--- a/diff.c
+++ b/diff.c
@@ -1322,6 +1322,7 @@ void diff_flush(struct diff_options *opt
 			struct diff_filepair *p = q->queue[i];
 			flush_one_pair(p, DIFF_FORMAT_RAW, options);
 		}
+		putchar(options->line_termination);
 	}
 	for (i = 0; i < q->nr; i++) {
 		struct diff_filepair *p = q->queue[i];
Previous: Petr Baudis
Message 6 of 6 in “diff-* --with-raw”
  1. diff-* --with-rawJunio C Hamano, Apr 11, 2006
  2. Junio C HamanoApr 11, 2006
  3. Petr BaudisApr 11, 2006
  4. Junio C HamanoApr 11, 2006
  5. Rename --with-raw to --patch-with-raw and document itPetr Baudis, Apr 11, 2006
  6. Separate the raw diff and patch with a newlinePetr Baudis, Apr 11, 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.