Skip to content

Commit 32019a7

Browse files
pks-tgitster
authored andcommitted
refs: rename is_special_ref() to is_pseudo_ref()
Rename `is_special_ref()` to `is_pseudo_ref()` to adapt to the newly defined terminology in our gitglossary(7). Note that in the preceding commit we have just renamed `is_pseudoref()` to `is_root_ref()`, where there may be confusion for in-flight patch series that add new calls to `is_pseudoref()`. In order to intentionally break such patch series we have thus picked `is_pseudo_ref()` instead of `is_pseudoref()` as the new name. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f6936e6 commit 32019a7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

refs.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,13 +1872,13 @@ static int refs_read_special_head(struct ref_store *ref_store,
18721872
return result;
18731873
}
18741874

1875-
static int is_special_ref(const char *refname)
1875+
static int is_pseudo_ref(const char *refname)
18761876
{
18771877
/*
1878-
* Special references are refs that have different semantics compared
1879-
* to "normal" refs. These refs can thus not be stored in the ref
1880-
* backend, but must always be accessed via the filesystem. The
1881-
* following refs are special:
1878+
* Pseudorefs are refs that have different semantics compared to
1879+
* "normal" refs. These refs can thus not be stored in the ref backend,
1880+
* but must always be accessed via the filesystem. The following refs
1881+
* are pseudorefs:
18821882
*
18831883
* - FETCH_HEAD may contain multiple object IDs, and each one of them
18841884
* carries additional metadata like where it came from.
@@ -1887,17 +1887,17 @@ static int is_special_ref(const char *refname)
18871887
* heads.
18881888
*
18891889
* Reading, writing or deleting references must consistently go either
1890-
* through the filesystem (special refs) or through the reference
1890+
* through the filesystem (pseudorefs) or through the reference
18911891
* backend (normal ones).
18921892
*/
1893-
static const char * const special_refs[] = {
1893+
static const char * const pseudo_refs[] = {
18941894
"FETCH_HEAD",
18951895
"MERGE_HEAD",
18961896
};
18971897
size_t i;
18981898

1899-
for (i = 0; i < ARRAY_SIZE(special_refs); i++)
1900-
if (!strcmp(refname, special_refs[i]))
1899+
for (i = 0; i < ARRAY_SIZE(pseudo_refs); i++)
1900+
if (!strcmp(refname, pseudo_refs[i]))
19011901
return 1;
19021902

19031903
return 0;
@@ -1908,7 +1908,7 @@ int refs_read_raw_ref(struct ref_store *ref_store, const char *refname,
19081908
unsigned int *type, int *failure_errno)
19091909
{
19101910
assert(failure_errno);
1911-
if (is_special_ref(refname))
1911+
if (is_pseudo_ref(refname))
19121912
return refs_read_special_head(ref_store, refname, oid, referent,
19131913
type, failure_errno);
19141914

0 commit comments

Comments
 (0)