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 <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
May 15, 2024 at 08:50 UTC
32019a7a76ba0e43714c2d161cd65992f161a7ab
1 file changed
+10
-10
refs.c
+10
-10
@@ -1872,13 +1872,13 @@ done:
1872
return result;
1873
}
1874
1875
-static int is_special_ref(const char *refname)
1875
+static int is_pseudo_ref(const char *refname)
1876
{
1877
/*
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:
1882
*
1883
* - FETCH_HEAD may contain multiple object IDs, and each one of them
1884
* carries additional metadata like where it came from.
@@ -1887,17 +1887,17 @@ static int is_special_ref(const char *refname)
1887
* heads.
1888
*
1889
* 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
1891
* backend (normal ones).
1892
*/
1893
- static const char * const special_refs[] = {
1893
+ static const char * const pseudo_refs[] = {
1894
"FETCH_HEAD",
1895
"MERGE_HEAD",
1896
};
1897
size_t i;
1898
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]))
1901
return 1;
1902
1903
return 0;
@@ -1908,7 +1908,7 @@ int refs_read_raw_ref(struct ref_store *ref_store, const char *refname,
1908
unsigned int *type, int *failure_errno)
1909
{
1910
assert(failure_errno);
1911
- if (is_special_ref(refname))
1911
+ if (is_pseudo_ref(refname))
1912
return refs_read_special_head(ref_store, refname, oid, referent,
1913
type, failure_errno);
1914