]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs: call branches branches
authorJunio C Hamano <gitster@pobox.com>
Tue, 4 Jun 2024 22:01:43 +0000 (15:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Jun 2024 22:07:08 +0000 (15:07 -0700)
These things in refs/heads/ hierarchy are called "branches" in human
parlance.  Replace REF_HEADS with REF_BRANCHES to make it clearer.

No end-user visible change intended at this step.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/ls-remote.c
connect.c
remote.h

index e8d65ebbdc0afc864826d722a7da7514a4f382ea..65fb22a8a28f595ec77b9137b8df6d95764733af 100644 (file)
@@ -68,7 +68,7 @@ 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('h', "heads", &flags, N_("limit to heads"), REF_BRANCHES),
                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 +100,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);
index 0d77737a5363c39fd71376c0f483bc8808538754..cf84e631e9f26658ade7af029751fbcaf2500612 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -38,8 +38,8 @@ static int check_ref(const char *name, unsigned int flags)
                                                         REFNAME_ALLOW_ONELEVEL))
                return 0;
 
-       /* REF_HEADS means that we want regular branch heads */
-       if ((flags & REF_HEADS) && starts_with(name, "heads/"))
+       /* REF_BRANCHES means that we want regular branch heads */
+       if ((flags & REF_BRANCHES) && starts_with(name, "heads/"))
                return 1;
 
        /* REF_TAGS means that we want tags */
index dfd4837e602755806bcfc73a725c04394ef81c6c..02e330f42cac66807d0dd6a13fd5e8b91d2d354a 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -200,7 +200,7 @@ struct ref {
 };
 
 #define REF_NORMAL     (1u << 0)
-#define REF_HEADS      (1u << 1)
+#define REF_BRANCHES   (1u << 1)
 #define REF_TAGS       (1u << 2)
 
 struct ref *find_ref_by_name(const struct ref *list, const char *name);