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

Subsystems: documentation, the rest

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:36

Miklos Vajna [off-list ref] writes:
This patch implements this, I hope.

(Sorry for the delay, BTW.)
No problem.  Thanks.
quoted hunk
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[]
 
 

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

From: Miklos Vajna <hidden>
Date: 2016-06-15 22:44:36

On Mon, May 12, 2008 at 04:10:09PM -0700, Junio C Hamano [off-list ref] wrote:
Hmm.  The symbol git-diff-core is defined for git-show and we say --raw is
the default for git-show because of it?
Ouch, somehow I read infdef: as ifdef: so I intenionally did not add
git-show, but it was a mistake.
How about doing it this way instead?
Sure, I like the idea of introducing the git-diff-p-stat-is-default
define.

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

From: Miklos Vajna <hidden>
Date: 2016-06-15 22:44:36

On Tue, May 13, 2008 at 11:11:26AM +0200, Miklos Vajna [off-list ref] wrote:
Ouch, somehow I read infdef: as ifdef: so I intenionally did not add
                       ^^^^^^ ifndef, to be correct.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help