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

Re: [PATCH] git show documentation: no longer refer to git-diff-tree options

From
Junio C Hamano <gitster@pobox.com>
Date
May 12, 2008, 23:10 UTC
Message-ID
<7vzlqvw23y.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1210545443-12665-1-git-send-email-vmiklos@frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
> This patch implements this, I hope.
>
> (Sorry for the delay, BTW.)
No problem.  Thanks.
Show 7 quoted lines
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index 13234fa..af7846d 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -17,6 +17,7 @@ ifdef::git-format-patch[]
>  	Generate patches without diffstat.
>  endif::git-format-patch[]

Hmm. The symbol git-diff-core is defined for git-show and we say --raw is the default for git-show because of it?

How about doing it this way instead?
---
 Documentation/diff-options.txt |   22 +++++++++++++++++-----
 Documentation/git-show.txt     |   14 ++++++++------
 2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 13234fa..a478612 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -7,21 +7,33 @@
 ifndef::git-format-patch[]
 ifndef::git-diff[]
 ifndef::git-log[]
+ifndef::git-show[]
 :git-diff-core: 1
+endif::git-show[]
 endif::git-log[]
 endif::git-diff[]
 endif::git-format-patch[]
 
+ifdef::git-diff[]
+:git-diff-p-is-default: 1
+endif::git-diff[]
+ifdef::git-show[]
+:git-diff-p-is-default: 1
+endif::git-show[]
 ifdef::git-format-patch[]
+:git-diff-p-stat-is-default: 1
+endif::git-format-patch[]
+
+ifdef::git-diff-p-stat-is-default[]
 -p::
 	Generate patches without diffstat.
-endif::git-format-patch[]
+endif::git-diff-p-stat-is-default[]
 
-ifndef::git-format-patch[]
+ifndef::git-diff-p-stat-is-default[]
 -p::
 	Generate patch (see section on generating patches).
-	{git-diff? This is the default.}
-endif::git-format-patch[]
+	{git-diff-p-is-default? This is the default.}
+endif::git-diff-p-stat-is-default[]
 
 -u::
 	Synonym for "-p".
@@ -72,7 +84,7 @@ endif::git-format-patch[]
 
 --patch-with-stat::
 	Synonym for "-p --stat".
-	{git-format-patch? This is the default.}
+	{git-diff-p-stat-is-default? This is the default.}
 
 -z::
 	NUL-line termination on output.  This affects the --raw
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index dccf0e2..6b5c3fb 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -25,12 +25,6 @@ with \--name-only).
 
 For plain blobs, it shows the plain contents.
 
-The command takes options applicable to the linkgit:git-diff-tree[1] command to
-control how the changes the commit introduces are shown.
-
-This manual page describes only the most frequently used options.
-
-
 OPTIONS
 -------
 <object>::
@@ -38,6 +32,14 @@ OPTIONS
 	For a more complete list of ways to spell object names, see
 	"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
 
+-s, --quiet::
+	Don't show a textural diff for commits.
+
+
+:git-show: 1
+include::diff-options.txt[]
+
+
 include::pretty-options.txt[]
 
 
Previous: Miklos VajnaNext: Miklos Vajna
Message 9 of 11 in “Documentation: move options of git-diff-tree to a separate file.”
  1. 1/2 Documentation: move options of git-diff-tree to a separate file.Miklos Vajna, Apr 26, 2008
  2. 2/2 Documentation: include diff-tree-options in git-show manpage.Miklos Vajna, Apr 26, 2008
  3. Junio C HamanoApr 27, 2008
  4. Documentation: move options of git-diff-tree to a separate file.Miklos Vajna, Apr 27, 2008
  5. しらいしななこApr 27, 2008
  6. git show documentation: no longer refer to git-diff-tree optionsMiklos Vajna, Apr 27, 2008
  7. Junio C HamanoApr 27, 2008
  8. git show documentation: no longer refer to git-diff-tree optionsMiklos Vajna, May 11, 2008
  9. Junio C HamanoMay 12, 2008
  10. Miklos VajnaMay 13, 2008
  11. Miklos VajnaMay 13, 2008

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.