]> source.dussan.org Git - gitea.git/commitdiff
revert the removed method to fix tmpl break on graph page (#25005)
authorLunny Xiao <xiaolunwen@gmail.com>
Tue, 30 May 2023 13:36:58 +0000 (21:36 +0800)
committerGitHub <noreply@github.com>
Tue, 30 May 2023 13:36:58 +0000 (21:36 +0800)
Fix #24996
Caused by #24634

modules/git/ref.go

index d3d1320e5065cd7203aa445b6b5ee225ba3404f5..73095f8dbee35b678540534612fd03ee96ad4464 100644 (file)
@@ -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()