diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-06-05 00:01:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-05 00:07:08 +0200 |
commit | b773fb882231cd8fac4ce37ffb5a8b1d985f37ea (patch) | |
tree | 1f4c95a7d4fb5c3a5502f1a4df3b9ab2e02d5ec2 /Documentation/git-ls-remote.txt | |
parent | refs: call branches branches (diff) | |
download | git-b773fb882231cd8fac4ce37ffb5a8b1d985f37ea.tar.xz git-b773fb882231cd8fac4ce37ffb5a8b1d985f37ea.zip |
ls-remote: introduce --branches and deprecate --heads
We call the tips of branches "heads", but this command calls the
option to show only branches "--heads", which confuses the branches
themselves and the tips of branches.
Straighten the terminology by introducing "--branches" option that
limits the output to branches, and deprecate "--heads" option used
that way.
We do not plan to remove "--heads" or "-h" yet; we may want to do so
at Git 3.0, in which case, we may need to start advertising upcoming
removal with an extra warning when they are used.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-ls-remote.txt')
-rw-r--r-- | Documentation/git-ls-remote.txt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt index 1c4f696ab5..76c86c3ce4 100644 --- a/Documentation/git-ls-remote.txt +++ b/Documentation/git-ls-remote.txt @@ -9,7 +9,7 @@ git-ls-remote - List references in a remote repository SYNOPSIS -------- [verse] -'git ls-remote' [--heads] [--tags] [--refs] [--upload-pack=<exec>] +'git ls-remote' [--branches] [--tags] [--refs] [--upload-pack=<exec>] [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>] [--symref] [<repository> [<patterns>...]] @@ -21,14 +21,16 @@ commit IDs. OPTIONS ------- --h:: ---heads:: +-b:: +--branches:: -t:: --tags:: - Limit to only refs/heads and refs/tags, respectively. + Limit to only local branches and local tags, respectively. These options are _not_ mutually exclusive; when given both, references stored in refs/heads and refs/tags are - displayed. Note that `git ls-remote -h` used without + displayed. Note that `--heads` and `-h` are deprecated + synonyms for `--branches` and `-b` and may be removed in + the future. Also note that `git ls-remote -h` used without anything else on the command line gives help, consistent with other git subcommands. |