Skip to content

Commit a096e70

Browse files
committed
refs: call branches branches
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 <[email protected]>
1 parent 786a3e4 commit a096e70

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

builtin/ls-remote.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
6868
N_("path of git-upload-pack on the remote host"),
6969
PARSE_OPT_HIDDEN },
7070
OPT_BIT('t', "tags", &flags, N_("limit to tags"), REF_TAGS),
71-
OPT_BIT('h', "heads", &flags, N_("limit to heads"), REF_HEADS),
71+
OPT_BIT('h', "heads", &flags, N_("limit to heads"), REF_BRANCHES),
7272
OPT_BIT(0, "refs", &flags, N_("do not show peeled tags"), REF_NORMAL),
7373
OPT_BOOL(0, "get-url", &get_url,
7474
N_("take url.<base>.insteadOf into account")),
@@ -100,7 +100,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
100100

101101
if (flags & REF_TAGS)
102102
strvec_push(&transport_options.ref_prefixes, "refs/tags/");
103-
if (flags & REF_HEADS)
103+
if (flags & REF_BRANCHES)
104104
strvec_push(&transport_options.ref_prefixes, "refs/heads/");
105105

106106
remote = remote_get(dest);

connect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ static int check_ref(const char *name, unsigned int flags)
3838
REFNAME_ALLOW_ONELEVEL))
3939
return 0;
4040

41-
/* REF_HEADS means that we want regular branch heads */
42-
if ((flags & REF_HEADS) && starts_with(name, "heads/"))
41+
/* REF_BRANCHES means that we want regular branch heads */
42+
if ((flags & REF_BRANCHES) && starts_with(name, "heads/"))
4343
return 1;
4444

4545
/* REF_TAGS means that we want tags */

remote.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ struct ref {
200200
};
201201

202202
#define REF_NORMAL (1u << 0)
203-
#define REF_HEADS (1u << 1)
203+
#define REF_BRANCHES (1u << 1)
204204
#define REF_TAGS (1u << 2)
205205

206206
struct ref *find_ref_by_name(const struct ref *list, const char *name);

0 commit comments

Comments
 (0)