aboutsummaryrefslogtreecommitdiff
path: root/ref/refname/root.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/refname/root.go
parentformat: Move commitgraph and packfile here (diff)
signatureNo signature
ref/name: Rename from ref/refname
Diffstat (limited to 'ref/refname/root.go')
-rw-r--r--ref/refname/root.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/ref/refname/root.go b/ref/refname/root.go
deleted file mode 100644
index 43361846..00000000
--- a/ref/refname/root.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package refname
-
-import "strings"
-
-// IsRoot reports whether name is one root ref according to Git.
-func IsRoot(name string) bool {
- if !IsRootSyntax(name) || IsPseudo(name) {
- return false
- }
-
- if strings.HasSuffix(name, "_HEAD") {
- return true
- }
-
- switch name {
- case "HEAD", "AUTO_MERGE", "BISECT_EXPECTED_REV", "NOTES_MERGE_PARTIAL", "NOTES_MERGE_REF", "MERGE_AUTOSTASH":
- return true
- default:
- return false
- }
-}