]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Documentation: explain optional arguments better
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Sat, 19 Sep 2015 07:47:50 +0000 (09:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Sep 2015 17:48:23 +0000 (10:48 -0700)
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>
Documentation/git-am.txt
Documentation/git-cherry-pick.txt
Documentation/git-commit-tree.txt
Documentation/git-commit.txt
Documentation/git-grep.txt
Documentation/git-merge.txt
Documentation/git-rebase.txt
Documentation/git-revert.txt
Documentation/git-status.txt

index 0d8ba48f792ae82237a56aa0dd2aca03f4e16020..6b09891db33d55ebd743d98ebb89bff22a21d69a 100644 (file)
@@ -138,7 +138,9 @@ default.   You can use `--no-utf8` to override this.
 
 -S[<keyid>]::
 --gpg-sign[=<keyid>]::
-       GPG-sign commits.
+       GPG-sign commits. The `keyid` argument is optional and
+       defaults to the committer identity; if specified, it must be
+       stuck to the option without a space.
 
 --continue::
 -r::
index 66ab29742c393b75b8abdfddc6915e85600c5f5d..77da29a474518c56c7dab23f5921aa50566506dd 100644 (file)
@@ -103,7 +103,9 @@ effect to your index in a row.
 
 -S[<keyid>]::
 --gpg-sign[=<keyid>]::
-       GPG-sign commits.
+       GPG-sign commits. The `keyid` argument is optional and
+       defaults to the committer identity; if specified, it must be
+       stuck to the option without a space.
 
 --ff::
        If the current HEAD is the same as the parent of the
index f5f2a8d326502714299cf85d9819bb065d5af390..a0b5457304008cec1cf728e5ac168c5f547173eb 100644 (file)
@@ -56,7 +56,9 @@ OPTIONS
 
 -S[<keyid>]::
 --gpg-sign[=<keyid>]::
-       GPG-sign commit.
+       GPG-sign commits. The `keyid` argument is optional and
+       defaults to the committer identity; if specified, it must be
+       stuck to the option without a space.
 
 --no-gpg-sign::
        Countermand `commit.gpgSign` configuration variable that is
index 51c63d66761d76e5edeadbada4fe66be99ba7a22..7f34a5b33103ed1c870f234687079badc393be77 100644 (file)
@@ -314,7 +314,9 @@ changes to tracked files.
 
 -S[<keyid>]::
 --gpg-sign[=<keyid>]::
-       GPG-sign commit.
+       GPG-sign commits. The `keyid` argument is optional and
+       defaults to the committer identity; if specified, it must be
+       stuck to the option without a space.
 
 --no-gpg-sign::
        Countermand `commit.gpgSign` configuration variable that is
index 1c07c7fe9ac8fe9835458fb56f479574d9481fb5..4a44d6da13cb749759f9d6164b88974ba55485ab 100644 (file)
@@ -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::
index 61d43a712d21effae7ae8fc353bc2b0e23eca06b..c06c4f2fb022f28d6ba0cdb662e66c6fe5fe06a7 100644 (file)
@@ -67,7 +67,9 @@ include::merge-options.txt[]
 
 -S[<keyid>]::
 --gpg-sign[=<keyid>]::
-       GPG-sign the resulting merge commit.
+       GPG-sign the resulting merge commit. The `keyid` argument is
+       optional and defaults to the committer identity; if specified,
+       it must be stuck to the option without a space.
 
 -m <msg>::
        Set the commit message to be used for the merge commit (in
index 1d01baa5fcfd03370953e8311b9c7bf3b49e2f4e..6d729458140bde0390919b2e310089e6f4bf5982 100644 (file)
@@ -285,7 +285,9 @@ which makes little sense.
 
 -S[<keyid>]::
 --gpg-sign[=<keyid>]::
-       GPG-sign commits.
+       GPG-sign commits. The `keyid` argument is optional and
+       defaults to the committer identity; if specified, it must be
+       stuck to the option without a space.
 
 -q::
 --quiet::
index 9eb83f01a4513ae3503258067133cae99189d39e..b15139ffdcda488c9e2314540885965723292a48 100644 (file)
@@ -82,7 +82,9 @@ effect to your index in a row.
 
 -S[<keyid>]::
 --gpg-sign[=<keyid>]::
-       GPG-sign commits.
+       GPG-sign commits. The `keyid` argument is optional and
+       defaults to the committer identity; if specified, it must be
+       stuck to the option without a space.
 
 -s::
 --signoff::
index 335f3123353482cfd708420dac3b766f181e89ff..e1e8f57cdd217b43b9b04bc54381e9b155d9cbde 100644 (file)
@@ -53,8 +53,9 @@ OPTIONS
 --untracked-files[=<mode>]::
        Show untracked files.
 +
-The mode parameter is optional (defaults to 'all'), and is used to
-specify the handling of untracked files.
+The mode parameter is used to specify the handling of untracked files.
+It is optional: it defaults to 'all', and if specified, it must be
+stuck to the option (e.g. `-uno`, but not `-u no`).
 +
 The possible options are:
 +