From: Jonathan Nieder <jrnieder@gmail.com>
To: Will Hall <will@gnatter.net>
Cc: git@vger.kernel.org, Michael J Gruber <git@drmicha.warpmail.net>,
Eli Barzilay <eli@barzilay.org>,
Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] Documentation: document show -s
Date: Tue, 9 Nov 2010 11:12:48 -0600 [thread overview]
Message-ID: <20101109171248.GG18960@burratino> (raw)
In-Reply-To: <4CD97399.4010704@gnatter.net>
Git's diff machinery has supported a -s (silence diff output) option
as far back as v0.99~900 (Silent flag for show-diff, 2005-04-13), but
the option is only advertised in an odd corner of the git diff-tree
manual.
The main use is to retrieve basic metadata about a commit:
git show -s rev
Explain this in the 'git log' manual and provide an example in the
'git show' examples section. This is kind of a cop-out, since it
would be more useful to explain it in the 'git show' manual proper,
which says:
The command takes options applicable to the git
diff-tree command to control how the changes the
commit introduces are shown.
This manual page describes only the most frequently
used options.
Fixing that is a larger task for another day.
Reported-by: Will Hall <will@gnatter.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Will Hall wrote:
> I know this should be obvious but I can't find *any* reference to
> this in git show --help
Thanks, good catch.
Documentation/git-show.txt | 4 ++++
Documentation/rev-list-options.txt | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index 2049c60..f0a8a1a 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -54,6 +54,10 @@ git show v1.0.0::
git show v1.0.0^\{tree\}::
Shows the tree pointed to by the tag `v1.0.0`.
+git show -s --format=%s v1.0.0^\{commit\}::
+ Shows the subject of the commit pointed to by the
+ tag `v1.0.0`.
+
git show next~10:Documentation/README::
Shows the contents of the file `Documentation/README` as
they were current in the 10th last commit of the branch
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 7a42567..1aaaf5a 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -146,6 +146,9 @@ options may be given. See linkgit:git-diff-files[1] for more options.
-t::
Show the tree objects in the diff output. This implies '-r'.
+
+-s::
+ Suppress diff output.
endif::git-rev-list[]
Commit Limiting
--
1.7.2.3.557.gab647.dirty
next prev parent reply other threads:[~2010-11-09 17:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 15:31 [PATCH 00/10 v4] More consistant terminology Matthieu Moy
2010-11-02 15:31 ` [PATCH 01/10] Better "Changed but not updated" message in git-status Matthieu Moy
2010-11-02 15:31 ` [PATCH 02/10] Replace "remote tracking" with "remote-tracking" Matthieu Moy
2010-11-02 15:31 ` [PATCH 03/10] Change remote tracking to remote-tracking in non-trivial places Matthieu Moy
2010-11-02 15:31 ` [PATCH 04/10] everyday.txt: change "tracking branch" to "remote-tracking branch" Matthieu Moy
2010-11-02 15:31 ` [PATCH 05/10] Change " Matthieu Moy
2010-11-02 15:43 ` Santi Béjar
2010-11-02 20:32 ` [PATCH] Forgotten 'tracking' -> 'remote-tracking' Matthieu Moy
2010-11-02 15:31 ` [PATCH 06/10] Change incorrect uses of "remote branch" meaning "remote-tracking" Matthieu Moy
2010-11-02 15:31 ` [PATCH 07/10] Change incorrect "remote branch" to "remote tracking branch" in C code Matthieu Moy
2010-11-09 16:15 ` What's the -s switch in git show? Will Hall
2010-11-09 17:12 ` Jonathan Nieder [this message]
2010-11-02 15:31 ` [PATCH 08/10] user-manual.txt: explain better the remote(-tracking) branch terms Matthieu Moy
2010-11-02 22:58 ` Peter Krefting
2010-11-02 21:06 ` [PATCH] " Matthieu Moy
2010-11-02 15:31 ` [PATCH 09/10] user-manual: remote-tracking can be checked out, with detached HEAD Matthieu Moy
2010-11-02 15:31 ` [PATCH 10/10] git-branch.txt: mention --set-upstream as a way to change upstream configuration Matthieu Moy
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=20101109171248.GG18960@burratino \
--to=jrnieder@gmail.com \
--cc=eli@barzilay.org \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=will@gnatter.net \
/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).