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

[PATCH] Fix diff-options references in git-diff and git-format-patch

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Mar 6, 2007, 03:27 UTC
Message-ID
<20070306032744.GA15330@Hermes.local>

Most of the git-diff-* documentation used [<common diff options>] instead of [--diff-options], so make that change in git-diff and git-format-patch.

In addition, git-format-patch didn't include the meanings of the diff options.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---
On Mar 5, 2007, at 6:14 PM, Johannes Schindelin wrote:
> Actually, it is described briefly in the synopsis. But not in the
> options section. Care to provide a patch (see git-log.txt for an
> example how to include the diff options)?
Something like this?
 Documentation/git-diff.txt         |    2 +-
 Documentation/git-format-patch.txt |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 12a531d..044cee9 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -8,7 +8,7 @@ git-diff - Show changes between commits, commit and working tree, etc
 
 SYNOPSIS
 --------
-'git-diff' [ --diff-options ] <commit>{0,2} [--] [<path>...]
+'git-diff' [<common diff options>] <commit>{0,2} [--] [<path>...]
 
 DESCRIPTION
 -----------
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 59f34b9..84eabeb 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -9,8 +9,8 @@ git-format-patch - Prepare patches for e-mail submission
 SYNOPSIS
 --------
 [verse]
-'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach] [--thread]
-	           [-s | --signoff] [--diff-options] [--start-number <n>]
+'git-format-patch' [<common diff options>] [-n | -k] [-o <dir> | --stdout]
+		   [--attach] [--thread] [-s | --signoff] [--start-number <n>]
 		   [--in-reply-to=Message-Id] [--suffix=.<sfx>]
 		   [--ignore-if-in-upstream]
 		   <since>[..<until>]
@@ -46,6 +46,8 @@ reference.
 
 OPTIONS
 -------
+include::diff-options.txt[]
+
 -o|--output-directory <dir>::
 	Use <dir> to store the resulting files, instead of the
 	current working directory.
-- 
1.5.0.3.271.g5ced
Message 1 of 1 in “Fix diff-options references in git-diff and git-format-patch”
  1. Fix diff-options references in git-diff and git-format-patchBrian Gernhardt, Mar 6, 2007

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.