Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2015-09-19 10:47:50 +0300
committerJunio C Hamano <gitster@pobox.com>2015-09-21 20:48:23 +0300
commit2b594bf90d84fd96f2b1fe904c1e62e391ceb4a0 (patch)
tree959671d4d95361422d5bc1952d43e749214df32b /Documentation/git-grep.txt
parent318ca61531d3189aef7b32a924518db1dd9f3374 (diff)
Documentation: explain optional arguments better
Improve the documentation of commands taking optional arguments in two ways: * Documents the behavior of '-O' (for grep) and '-S' (for commands creating commits) when used without the optional argument. * Document the syntax of these options. For the second point, the behavior is documented in gitcli(7), but it is easy for users to miss, and hard for the same user to understand why e.g. "git status -u no" does not work. Document this explicitly in the documentation of each short option having an optional argument: they are the most error prone since there is no '=' sign between the option and its argument. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
-rw-r--r--Documentation/git-grep.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 1c07c7fe9a..4a44d6da13 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -165,7 +165,10 @@ OPTIONS
Open the matching files in the pager (not the output of 'grep').
If the pager happens to be "less" or "vi", and the user
specified only one pattern, the first file is positioned at
- the first match automatically.
+ the first match automatically. The `pager` argument is
+ optional; if specified, it must be stuck to the option
+ without a space. If `pager` is unspecified, the default pager
+ will be used (see `core.pager` in linkgit:git-config[1]).
-z::
--null::