Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 7b02c83

Browse files
moygitster
authored andcommitted
Documentation: move description of -s, --no-patch to diff-options.txt
Technically, "-s, --no-patch" is implemented in diff.c ("git diff --no-patch" is essentially useless, but valid). From the user point of view, this allows the documentation to show up in "git show --help", which is one of the most useful use of the option. While we're there, add a sentence explaining why the option can be useful. Signed-off-by: Matthieu Moy <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0791ab0 commit 7b02c83

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Documentation/diff-options.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ ifndef::git-format-patch[]
2626
{git-diff? This is the default.}
2727
endif::git-format-patch[]
2828

29+
-s::
30+
--no-patch::
31+
Suppress diff output. Useful for commands like `git show` that
32+
show the patch by default, or to cancel the effect of `--patch`.
33+
2934
-U<n>::
3035
--unified=<n>::
3136
Generate diffs with <n> lines of context instead of

Documentation/rev-list-options.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,4 @@ options may be given. See linkgit:git-diff-files[1] for more options.
837837
-t::
838838

839839
Show the tree objects in the diff output. This implies '-r'.
840-
841-
-s::
842-
--no-patch::
843-
Suppress diff output.
844840
endif::git-rev-list[]

0 commit comments

Comments
 (0)