aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-02 10:17:32 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-02 09:43:57 -0700
commit7a1a577a354cccc1e9db6e0b2dbace1b742f3ce2 (patch)
tree44f9c942a77cd100479b43ad0585412a6af01348
parent86e338e2a2dbdea7747f6e94fad2e98fadc2cc39 (diff)
downloadgit-7a1a577a354cccc1e9db6e0b2dbace1b742f3ce2.tar.gz
refs: refname `is_special_ref()` to `is_pseudo_ref()`
Notice: this object is not reachable from any branch.
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>
Notice: this object is not reachable from any branch.
-rw-r--r--refs.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/refs.c b/refs.c
index 0a4acde3ca..6266f77474 100644
--- a/refs.c
+++ b/refs.c
@@ -1876,13 +1876,13 @@ done:
return result;
}
-static int is_special_ref(const char *refname)
+static int is_pseudo_ref(const char *refname)
{
/*
- * Special references are refs that have different semantics compared
- * to "normal" refs. These refs can thus not be stored in the ref
- * backend, but must always be accessed via the filesystem. The
- * following refs are special:
+ * Pseudorefs are refs that have different semantics compared to
+ * "normal" refs. These refs can thus not be stored in the ref backend,
+ * but must always be accessed via the filesystem. The following refs
+ * are pseudorefs:
*
* - FETCH_HEAD may contain multiple object IDs, and each one of them
* carries additional metadata like where it came from.
@@ -1891,17 +1891,17 @@ static int is_special_ref(const char *refname)
* heads.
*
* Reading, writing or deleting references must consistently go either
- * through the filesystem (special refs) or through the reference
+ * through the filesystem (pseudorefs) or through the reference
* backend (normal ones).
*/
- static const char * const special_refs[] = {
+ static const char * const pseudo_refs[] = {
"FETCH_HEAD",
"MERGE_HEAD",
};
size_t i;
- for (i = 0; i < ARRAY_SIZE(special_refs); i++)
- if (!strcmp(refname, special_refs[i]))
+ for (i = 0; i < ARRAY_SIZE(pseudo_refs); i++)
+ if (!strcmp(refname, pseudo_refs[i]))
return 1;
return 0;
@@ -1912,7 +1912,7 @@ int refs_read_raw_ref(struct ref_store *ref_store, const char *refname,
unsigned int *type, int *failure_errno)
{
assert(failure_errno);
- if (is_special_ref(refname))
+ if (is_pseudo_ref(refname))
return refs_read_special_head(ref_store, refname, oid, referent,
type, failure_errno);