]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Documentation: document show -s
authorJonathan Nieder <jrnieder@gmail.com>
Tue, 9 Nov 2010 17:12:48 +0000 (11:12 -0600)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Nov 2010 17:42:57 +0000 (09:42 -0800)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-show.txt
Documentation/rev-list-options.txt

index 2049c60f75aeb5ae325a49e3eb3c7e7132fec193..f0a8a1aff3694cf00587d8670a8fe9962fe98af3 100644 (file)
@@ -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
index 7a42567060bc4c79e5eef00e4cc01a90c9ab39a4..1aaaf5ae8b990ce2b0a49c55aba50776727c37fe 100644 (file)
@@ -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