{{template "repo/sub_menu" .}}
{{template "repo/commits_table" .}}
{{- /* for /owner/repo/commits/branch/the-name */ -}}
{{- $branchDropdownCurrentRefType := "branch" -}}
{{- $branchDropdownCurrentRefShortName := .BranchName -}}
{{- if .IsViewTag -}}
{{- /* for /owner/repo/commits/tag/the-name */ -}}
{{- $branchDropdownCurrentRefType = "tag" -}}
{{- $branchDropdownCurrentRefShortName = .TagName -}}
{{- else if .IsViewCommit -}}
{{- /* for /owner/repo/commits/commit/000000 */ -}}
{{- $branchDropdownCurrentRefType = "commit" -}}
{{- $branchDropdownCurrentRefShortName = ShortSha .CommitID -}}
{{- end -}}
{{- template "repo/branch_dropdown" dict
"Repository" .Repository
"ShowTabBranches" true
"ShowTabTags" true
"CurrentRefType" $branchDropdownCurrentRefType
"CurrentRefShortName" $branchDropdownCurrentRefShortName
"CurrentTreePath" .TreePath
"RefLinkTemplate" "{RepoLink}/commits/{RefType}/{RefShortName}/{TreePath}"
"AllowCreateNewRef" .CanCreateBranch
-}}
{{svg "octicon-git-branch"}}
{{ctx.Locale.Tr "repo.commit_graph"}}