fix: parse HEAD ref (#38119)

backport #38088
This commit is contained in:
Lunny Xiao
2026-06-14 19:52:44 +00:00
committed by GitHub
parent 98cc15b307
commit bb4cccc6e9
4 changed files with 30 additions and 3 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ func (ref RefName) ShortName() string {
if ref.IsFor() {
return ref.ForBranchName()
}
return string(ref) // usually it is a commit ID
return string(ref) // usually it is a commit ID, or "HEAD"
}
// RefGroup returns the group type of the reference