Skip to content

Commit ed7066e

Browse files
committed
convert to ShortSha
1 parent ba52a66 commit ed7066e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

templates/repo/commits.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
{{$branchDropdownCurrentRefType := "branch"}}
1010
{{$branchDropdownCurrentRefShortName := .RefName}}
11+
{{if and (not .IsViewBranch) (not .IsViewTag)}}
12+
{{$branchDropdownCurrentRefShortName = ShortSha .RefName}}
13+
{{end}}
1114
{{if .IsViewTag}}
1215
{{$branchDropdownCurrentRefType = "tag"}}
1316
{{$branchDropdownCurrentRefShortName = .TagName}}

templates/repo/home.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
<div class="repo-button-row-left">
2727
{{$branchDropdownCurrentRefType := "branch"}}
2828
{{$branchDropdownCurrentRefShortName := .RefName}}
29+
{{if and (not .IsViewBranch) (not .IsViewTag)}}
30+
{{$branchDropdownCurrentRefShortName = ShortSha .RefName}}
31+
{{end}}
2932
{{if .IsViewTag}}
3033
{{$branchDropdownCurrentRefType = "tag"}}
3134
{{$branchDropdownCurrentRefShortName = .TagName}}

0 commit comments

Comments
 (0)