fix: parse HEAD ref (#38088)

fix #38086
This commit is contained in:
wxiaoguang
2026-06-12 18:27:38 +00:00
committed by GitHub
parent 15ae1bfc8c
commit ae49f65692
3 changed files with 15 additions and 3 deletions
+1 -1
View File
@@ -168,7 +168,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