Skip to content

Commit faae819

Browse files
authored
revert the removed method to fix tmpl break on graph page (#25005)
Fix #24996 Caused by #24634
1 parent ee99cf6 commit faae819

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/git/ref.go

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ func (ref *Reference) Commit() (*Commit, error) {
5353
return ref.repo.getCommit(ref.Object)
5454
}
5555

56+
// ShortName returns the short name of the reference
57+
func (ref *Reference) ShortName() string {
58+
return RefName(ref.Name).ShortName()
59+
}
60+
5661
// RefGroup returns the group type of the reference
5762
func (ref *Reference) RefGroup() string {
5863
return RefName(ref.Name).RefGroup()

0 commit comments

Comments
 (0)