File tree Expand file tree Collapse file tree 2 files changed +24
-12
lines changed Expand file tree Collapse file tree 2 files changed +24
-12
lines changed Original file line number Diff line number Diff line change 1- {{$branchDropdownCurrentRefType := "branch"}}
2- {{$branchDropdownCurrentRefShortName := .ctxData.BranchName}}
3- {{if .ctxData.IsViewTag}}
4- {{$branchDropdownCurrentRefType = "tag"}}
5- {{$branchDropdownCurrentRefShortName = .ctxData.TagName}}
6- {{end}}
1+ {{- /* for repo home (default branch) and /owner/repo/src/branch/the-name */ -}}
2+ {{- $branchDropdownCurrentRefType := "branch" -}}
3+ {{- $branchDropdownCurrentRefShortName := .ctxData.BranchName -}}
4+ {{- if .IsViewTag -}}
5+ {{- /* for /owner/repo/src/tag/the-name */ -}}
6+ {{- $branchDropdownCurrentRefType = "tag" -}}
7+ {{- $branchDropdownCurrentRefShortName = .ctxData.TagName -}}
8+ {{- else if .IsViewCommit -}}
9+ {{- /* for /owner/repo/src/commit/000000 */ -}}
10+ {{- $branchDropdownCurrentRefType = "commit" -}}
11+ {{- $branchDropdownCurrentRefShortName = ShortSha .ctxData.CommitID -}}
12+ {{- end -}}
713{{template "repo/branch_dropdown" dict
814 "Repository" .ctxData.Repository
915 "ShowTabBranches" true
Original file line number Diff line number Diff line change 1- {{$branchDropdownCurrentRefType := "branch"}}
2- {{$branchDropdownCurrentRefShortName := .BranchName}}
3- {{if .IsViewTag}}
4- {{$branchDropdownCurrentRefType = "tag"}}
5- {{$branchDropdownCurrentRefShortName = .TagName}}
6- {{end}}
1+ {{- /* for repo home (default branch) and /owner/repo/src/branch/the-name */ -}}
2+ {{- $branchDropdownCurrentRefType := "branch" -}}
3+ {{- $branchDropdownCurrentRefShortName := .BranchName -}}
4+ {{- if .IsViewTag -}}
5+ {{- /* for /owner/repo/src/tag/the-name */ -}}
6+ {{- $branchDropdownCurrentRefType = "tag" -}}
7+ {{- $branchDropdownCurrentRefShortName = .TagName -}}
8+ {{- else if .IsViewCommit -}}
9+ {{- /* for /owner/repo/src/commit/000000 */ -}}
10+ {{- $branchDropdownCurrentRefType = "commit" -}}
11+ {{- $branchDropdownCurrentRefShortName = ShortSha .CommitID -}}
12+ {{- end -}}
713
814<div class="view-file-tree-sidebar-top">
915 <div class="sidebar-header">
You can’t perform that action at this time.
0 commit comments