Skip to content

Commit cdef998

Browse files
committed
Merge branch 'jc/doc-single-h-is-for-help'
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`
2 parents b4374e9 + 1ff466c commit cdef998

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Documentation/git-ls-remote.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ OPTIONS
2828
Limit to only refs/heads and refs/tags, respectively.
2929
These options are _not_ mutually exclusive; when given
3030
both, references stored in refs/heads and refs/tags are
31-
displayed.
31+
displayed. Note that `git ls-remote -h` used without
32+
anything else on the command line gives help, consistent
33+
with other git subcommands.
3234

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

Documentation/gitcli.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ usage: git describe [<options>] <commit-ish>*
126126
--long always use long format
127127
--abbrev[=<n>] use <n> digits to display SHA-1s
128128
---------------------------------------------
129+
+
130+
Note that some subcommand (e.g. `git grep`) may behave differently
131+
when there are things on the command line other than `-h`, but `git
132+
subcmd -h` without anything else on the command line is meant to
133+
consistently give the usage.
129134

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

0 commit comments

Comments
 (0)