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

[PATCH] Rename --with-raw to --patch-with-raw and document it

From
Petr Baudis <pasky@suse.cz>
Date
Apr 11, 2006, 11:22 UTC
Message-ID
<20060411112217.10363.66165.stgit@machine.or.cz>
In-Reply-To
<7vr7456jb4.fsf@assigned-by-dhcp.cox.net>
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 Documentation/diff-options.txt |    3 +++
 diff.c                         |    2 +-
 diff.h                         |    2 ++
 3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index ec6811c..338014c 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -4,6 +4,9 @@
 -u::
 	Synonym for "-p".
 
+--patch-with-raw::
+	Generate patch but keep also the default raw diff output.
+
 -z::
 	\0 line termination on output
 
diff --git a/diff.c b/diff.c
index 12924f2..00c79aa 100644
--- a/diff.c
+++ b/diff.c
@@ -862,7 +862,7 @@ int diff_opt_parse(struct diff_options *
 	const char *arg = av[0];
 	if (!strcmp(arg, "-p") || !strcmp(arg, "-u"))
 		options->output_format = DIFF_FORMAT_PATCH;
-	else if (!strcmp(arg, "--with-raw")) {
+	else if (!strcmp(arg, "--patch-with-raw")) {
 		options->output_format = DIFF_FORMAT_PATCH;
 		options->with_raw = 1;
 	}
diff --git a/diff.h b/diff.h
index 07b153b..c5372b9 100644
--- a/diff.h
+++ b/diff.h
@@ -113,6 +113,8 @@ #define COMMON_DIFF_OPTIONS_HELP \
 "  -z            output diff-raw with lines terminated with NUL.\n" \
 "  -p            output patch format.\n" \
 "  -u            synonym for -p.\n" \
+"  --patch-with-raw\n" \
+"                output both a patch and the diff-raw format.\n" \
 "  --name-only   show only names of changed files.\n" \
 "  --name-status show names and status of changed files.\n" \
 "  --full-index  show full object name on index lines.\n" \
Previous: Junio C HamanoNext: Petr Baudis
Message 5 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.