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

[PATCH 5/5] Add --patch option for diff-*

From
THTimo Hirvonen <tihirvon@gmail.com>
Date
Jun 23, 2006, 22:01 UTC
Message-ID
<20060624010156.d357164d.tihirvon@gmail.com>
In-Reply-To
<20060624003315.804a1796.tihirvon@gmail.com>
Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
 diff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index ab8aed7..596a877 100644
--- a/diff.c
+++ b/diff.c
@@ -1460,7 +1460,7 @@ static int opt_arg(const char *arg, int 
 int diff_opt_parse(struct diff_options *options, const char **av, int ac)
 {
 	const char *arg = av[0];
-	if (!strcmp(arg, "-p") || !strcmp(arg, "-u"))
+	if (!strcmp(arg, "-p") || !strcmp(arg, "-u") || !strcmp(arg, "--patch"))
 		options->output_fmt |= OUTPUT_FMT_PATCH;
 	else if (opt_arg(arg, 'U', "unified", &options->context))
 		options->output_fmt |= OUTPUT_FMT_PATCH;
-- 
1.4.1.rc1.gf603-dirty
Previous: Timo Hirvonen
Message 8 of 8 in “git-merge: Don't use -p when outputting summary”
  1. 1/5 git-merge: Don't use -p when outputting summaryTimo Hirvonen, Jun 23, 2006
  2. 2/5 Rework diff optionsTimo Hirvonen, Jun 23, 2006
  3. Timo HirvonenJun 23, 2006
  4. Junio C HamanoJun 24, 2006
  5. Timo HirvonenJun 24, 2006
  6. 3/5 Set default diff output format after parsing command lineTimo Hirvonen, Jun 23, 2006
  7. 4/5 Make --raw option available for all diff commandsTimo Hirvonen, Jun 23, 2006
  8. 5/5 Add --patch option for diff-*Timo Hirvonen, Jun 23, 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.