Skip to content

Commit 60aa9cf

Browse files
jrngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ae3cdfe commit 60aa9cf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Documentation/git-show.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ git show v1.0.0::
5454
git show v1.0.0^\{tree\}::
5555
Shows the tree pointed to by the tag `v1.0.0`.
5656

57+
git show -s --format=%s v1.0.0^\{commit\}::
58+
Shows the subject of the commit pointed to by the
59+
tag `v1.0.0`.
60+
5761
git show next~10:Documentation/README::
5862
Shows the contents of the file `Documentation/README` as
5963
they were current in the 10th last commit of the branch

Documentation/rev-list-options.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ options may be given. See linkgit:git-diff-files[1] for more options.
146146
-t::
147147

148148
Show the tree objects in the diff output. This implies '-r'.
149+
150+
-s::
151+
Suppress diff output.
149152
endif::git-rev-list[]
150153

151154
Commit Limiting

0 commit comments

Comments
 (0)