aboutsummaryrefslogtreecommitdiff
path: root/ref/name/pseudo.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-26 09:19:01 +0000
committerGravatar Runxi Yu2026-03-26 09:19:01 +0000
commit929b8cc620abca70b3444b09be5249f6c6cb7812 (patch)
tree29b1edba8f597d09a2a51a6b2c901389cc40e242 /ref/name/pseudo.go
parentformat: Move commitgraph and packfile here (diff)
signatureNo signature
ref/name: Rename from ref/refname
Diffstat (limited to 'ref/name/pseudo.go')
-rw-r--r--ref/name/pseudo.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/ref/name/pseudo.go b/ref/name/pseudo.go
new file mode 100644
index 00000000..f0ad1ae8
--- /dev/null
+++ b/ref/name/pseudo.go
@@ -0,0 +1,11 @@
+package refname
+
+// IsPseudo reports whether name is one Git pseudo-ref.
+func IsPseudo(name string) bool {
+ switch name {
+ case "FETCH_HEAD", "MERGE_HEAD":
+ return true
+ default:
+ return false
+ }
+}