mirror of
https://github.com/go-gitea/gitea
synced 2025-07-12 13:37:20 +00:00
Make API "compare" accept commit IDs (#32801)
This commit is contained in:
@ -142,7 +142,6 @@ func (ref RefName) RemoteName() string {
|
||||
|
||||
// ShortName returns the short name of the reference name
|
||||
func (ref RefName) ShortName() string {
|
||||
refName := string(ref)
|
||||
if ref.IsBranch() {
|
||||
return ref.BranchName()
|
||||
}
|
||||
@ -158,8 +157,7 @@ func (ref RefName) ShortName() string {
|
||||
if ref.IsFor() {
|
||||
return ref.ForBranchName()
|
||||
}
|
||||
|
||||
return refName
|
||||
return string(ref) // usually it is a commit ID
|
||||
}
|
||||
|
||||
// RefGroup returns the group type of the reference
|
||||
|
Reference in New Issue
Block a user