git/Documentation/git-show.txt
Jonathan Nieder 60aa9cf8f3 Documentation: document show -s
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>
2010-11-09 09:42:57 -08:00

89 lines
1.9 KiB
Plaintext

git-show(1)
===========
NAME
----
git-show - Show various types of objects
SYNOPSIS
--------
'git show' [options] <object>...
DESCRIPTION
-----------
Shows one or more objects (blobs, trees, tags and commits).
For commits it shows the log message and textual diff. It also
presents the merge commit in a special format as produced by
'git diff-tree --cc'.
For tags, it shows the tag message and the referenced objects.
For trees, it shows the names (equivalent to 'git ls-tree'
with \--name-only).
For plain blobs, it shows the plain contents.
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.
OPTIONS
-------
<object>...::
The names of objects to show.
For a more complete list of ways to spell object names, see
"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
include::pretty-options.txt[]
include::pretty-formats.txt[]
EXAMPLES
--------
git show v1.0.0::
Shows the tag `v1.0.0`, along with the object the tags
points at.
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
`next`.
git show master:Makefile master:t/Makefile::
Concatenates the contents of said Makefiles in the head
of the branch `master`.
Discussion
----------
include::i18n.txt[]
Author
------
Written by Linus Torvalds <torvalds@osdl.org> and
Junio C Hamano <gitster@pobox.com>. Significantly enhanced by
Johannes Schindelin <Johannes.Schindelin@gmx.de>.
Documentation
-------------
Documentation by David Greaves, Petr Baudis and the git-list <git@vger.kernel.org>.
GIT
---
Part of the linkgit:git[1] suite