diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-06-20 15:45:16 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-20 15:45:17 -0700 |
| commit | 892fd8b89fc62e2b400d7165700e67343f7a1c92 (patch) | |
| tree | 3bb7bcc15ef51a5833f7afd348a34194b1a1d497 /builtin/ls-remote.c | |
| parent | 166cdd8915a957f0fb5a2bbca3075489e8e3a754 (diff) | |
| parent | 607c3d372ef89cf16874c288c60423587286d182 (diff) | |
| download | git-892fd8b89fc62e2b400d7165700e67343f7a1c92.tar.gz | |
Merge branch 'jc/heads-are-branches'
The "--heads" option of "ls-remote" and "show-ref" has been been
deprecated; "--branches" replaces "--heads".
* jc/heads-are-branches:
show-ref: introduce --branches and deprecate --heads
ls-remote: introduce --branches and deprecate --heads
refs: call branches branches
Diffstat (limited to 'builtin/ls-remote.c')
| -rw-r--r-- | builtin/ls-remote.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index e8d65ebbdc..69841ed49f 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -9,7 +9,7 @@ #include "wildmatch.h" static const char * const ls_remote_usage[] = { - N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n" + N_("git ls-remote [--branches] [--tags] [--refs] [--upload-pack=<exec>]\n" " [-q | --quiet] [--exit-code] [--get-url] [--sort=<key>]\n" " [--symref] [<repository> [<patterns>...]]"), NULL @@ -68,7 +68,10 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) N_("path of git-upload-pack on the remote host"), PARSE_OPT_HIDDEN }, OPT_BIT('t', "tags", &flags, N_("limit to tags"), REF_TAGS), - OPT_BIT('h', "heads", &flags, N_("limit to heads"), REF_HEADS), + OPT_BIT('b', "branches", &flags, N_("limit to branches"), REF_BRANCHES), + OPT_BIT_F('h', "heads", &flags, + N_("deprecated synonym for --branches"), REF_BRANCHES, + PARSE_OPT_HIDDEN), OPT_BIT(0, "refs", &flags, N_("do not show peeled tags"), REF_NORMAL), OPT_BOOL(0, "get-url", &get_url, N_("take url.<base>.insteadOf into account")), @@ -100,7 +103,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) if (flags & REF_TAGS) strvec_push(&transport_options.ref_prefixes, "refs/tags/"); - if (flags & REF_HEADS) + if (flags & REF_BRANCHES) strvec_push(&transport_options.ref_prefixes, "refs/heads/"); remote = remote_get(dest); |
