From: Miklos Vajna <vmiklos@frugalware.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, nanako3@bluebottle.com
Subject: [PATCH] git show documentation: no longer refer to git-diff-tree options
Date: Mon, 12 May 2008 00:37:23 +0200 [thread overview]
Message-ID: <1210545443-12665-1-git-send-email-vmiklos@frugalware.org> (raw)
In-Reply-To: <7v3ap7gq3d.fsf@gitster.siamese.dyndns.org>
The only git-diff-tree option that makes sense with git-show is '-s',
but (from a user's point of view) it has sightly different meaning,
since you don't have a --stdin option when using git-show.
This patch removes the reference to git-diff-tree options and adds
documentation for '-s', in the context of git-show.
It also includes git-diff options, but excludes the ones which are not
relevant for this command.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Sun, Apr 27, 2008 at 10:33:26AM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> Hmm, yes but not exactly.
>
> You lost --stat, --name-only and friends that were implied by
> mentioning
> "diff-tree".
>
> I agree your _motivation_ behind your original patch is good. Saying
> "see
> also that page if you want to do very exotic and rarely useful
> operation"
> is one thing, but saying "described are most often used ones" and not
> describing enough is bad.
>
> Perhaps we would want to include diff-options.txt. There may be some
> options that are no-op or always-on in the context of "git show" in
> the
> file, but we already have an infrastracture to turn parts of the
> inclusion
> on and off depending on which manual page includes it.
This patch implements this, I hope.
(Sorry for the delay, BTW.)
Documentation/diff-options.txt | 10 ++++++++++
Documentation/git-show.txt | 14 ++++++++------
2 files changed, 18 insertions(+), 6 deletions(-)
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[]
+ifndef::git-show[]
ifndef::git-format-patch[]
-p::
Generate patch (see section on generating patches).
@@ -25,6 +26,7 @@ endif::git-format-patch[]
-u::
Synonym for "-p".
+endif::git-show[]
-U<n>::
Shorthand for "--unified=<n>".
@@ -37,8 +39,10 @@ endif::git-format-patch[]
Generate the raw format.
{git-diff-core? This is the default.}
+ifndef::git-show[]
--patch-with-raw::
Synonym for "-p --raw".
+endif::git-show[]
--stat[=width[,name-width]]::
Generate a diffstat. You can override the default
@@ -70,6 +74,7 @@ endif::git-format-patch[]
Output a condensed summary of extended header information
such as creations, renames and mode changes.
+ifndef::git-show[]
--patch-with-stat::
Synonym for "-p --stat".
{git-format-patch? This is the default.}
@@ -78,6 +83,7 @@ endif::git-format-patch[]
NUL-line termination on output. This affects the --raw
output field terminator. Also output from commands such
as "git-log" will be delimited with NUL between commits.
+endif::git-show[]
--name-only::
Show only names of changed files.
@@ -159,6 +165,7 @@ endif::git-format-patch[]
the number of rename/copy targets exceeds the specified
number.
+ifndef::git-show[]
-S<string>::
Look for differences that contain the change in <string>.
@@ -170,6 +177,7 @@ endif::git-format-patch[]
--pickaxe-regex::
Make the <string> not a plain string but an extended POSIX
regex to match.
+endif::git-show[]
-O<orderfile>::
Output the patch in the order specified in the
@@ -212,6 +220,7 @@ endif::git-format-patch[]
-w::
Shorthand for "--ignore-all-space".
+ifndef::git-show[]
--exit-code::
Make the program exit with codes similar to diff(1).
That is, it exits with 1 if there were differences and
@@ -219,6 +228,7 @@ endif::git-format-patch[]
--quiet::
Disable all output of the program. Implies --exit-code.
+endif::git-show[]
--ext-diff::
Allow an external diff helper to be executed. If you set an
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[]
--
1.5.5.1
next prev parent reply other threads:[~2008-05-11 22:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-26 21:01 [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Miklos Vajna
2008-04-26 21:01 ` [PATCH 2/2] Documentation: include diff-tree-options in git-show manpage Miklos Vajna
2008-04-27 0:24 ` [PATCH 1/2] Documentation: move options of git-diff-tree to a separate file Junio C Hamano
2008-04-27 2:17 ` [PATCH] " Miklos Vajna
2008-04-27 7:29 ` しらいしななこ
[not found] ` <200804270730.m3R7UTTp011092@mi1.bluebottle.com>
2008-04-27 11:45 ` [PATCH] git show documentation: no longer refer to git-diff-tree options Miklos Vajna
2008-04-27 17:33 ` Junio C Hamano
2008-05-11 22:37 ` Miklos Vajna [this message]
2008-05-12 23:10 ` Junio C Hamano
2008-05-13 9:11 ` Miklos Vajna
2008-05-13 9:16 ` Miklos Vajna
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1210545443-12665-1-git-send-email-vmiklos@frugalware.org \
--to=vmiklos@frugalware.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nanako3@bluebottle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).