Skip to content

Commit

Permalink
revert the removed method to fix tmpl break on graph page (#25005)
Browse files Browse the repository at this point in the history
Fix #24996 
Caused by #24634
  • Loading branch information
lunny committed May 30, 2023
1 parent ee99cf6 commit faae819
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/git/ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ func (ref *Reference) Commit() (*Commit, error) {
return ref.repo.getCommit(ref.Object)
}

// ShortName returns the short name of the reference
func (ref *Reference) ShortName() string {
return RefName(ref.Name).ShortName()
}

// RefGroup returns the group type of the reference
func (ref *Reference) RefGroup() string {
return RefName(ref.Name).RefGroup()
Expand Down

0 comments on commit faae819

Please sign in to comment.