Make API "compare" accept commit IDs (#32801)
This commit is contained in:
parent
01b1896bf5
commit
22bf2ca6ba
10 changed files with 154 additions and 124 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue