Browse Source

Merge branch 'jc/doc-single-h-is-for-help' into maint

Both "git ls-remote -h" and "git grep -h" give short usage help,
like any other Git subcommand, but it is not unreasonable to expect
that the former would behave the same as "git ls-remote --head"
(there is no other sensible behaviour for the latter).  The
documentation has been updated in an attempt to clarify this.

* jc/doc-single-h-is-for-help:
  Documentation: clarify that `-h` alone stands for `help`
maint
Junio C Hamano 5 years ago
parent
commit
fda2baffd2
  1. 4
      Documentation/git-ls-remote.txt
  2. 5
      Documentation/gitcli.txt

4
Documentation/git-ls-remote.txt

@ -28,7 +28,9 @@ OPTIONS @@ -28,7 +28,9 @@ OPTIONS
Limit to only refs/heads and refs/tags, respectively.
These options are _not_ mutually exclusive; when given
both, references stored in refs/heads and refs/tags are
displayed.
displayed. Note that `git ls-remote -h` used without
anything else on the command line gives help, consistent
with other git subcommands.

--refs::
Do not show peeled tags or pseudorefs like `HEAD` in the output.

5
Documentation/gitcli.txt

@ -126,6 +126,11 @@ usage: git describe [<options>] <commit-ish>* @@ -126,6 +126,11 @@ usage: git describe [<options>] <commit-ish>*
--long always use long format
--abbrev[=<n>] use <n> digits to display SHA-1s
---------------------------------------------
+
Note that some subcommand (e.g. `git grep`) may behave differently
when there are things on the command line other than `-h`, but `git
subcmd -h` without anything else on the command line is meant to
consistently give the usage.

--help-all::
Some Git commands take options that are only used for plumbing or that

Loading…
Cancel
Save