File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1332,7 +1332,7 @@ func registerRoutes(m *web.Router) {
13321332
13331333 m .Group ("/{username}/{reponame}" , func () { // repo tags
13341334 m .Group ("/tags" , func () {
1335- m .Get ("" , context .RepoRefByDefaultBranch (), repo .TagsList )
1335+ m .Get ("" , context .RepoRefByDefaultBranch () /* for the "commits" tab */ , repo .TagsList )
13361336 m .Get (".rss" , feedEnabled , repo .TagsListFeedRSS )
13371337 m .Get (".atom" , feedEnabled , repo .TagsListFeedAtom )
13381338 m .Get ("/list" , repo .GetTagList )
@@ -1522,7 +1522,7 @@ func registerRoutes(m *web.Router) {
15221522
15231523 m .Group ("/branches" , func () {
15241524 m .Get ("/list" , repo .GetBranchesList )
1525- m .Get ("" , context .RepoRefByDefaultBranch (), repo .Branches )
1525+ m .Get ("" , context .RepoRefByDefaultBranch () /* for the "commits" tab */ , repo .Branches )
15261526 }, repo .MustBeNotEmpty )
15271527
15281528 m .Group ("/media" , func () {
Original file line number Diff line number Diff line change @@ -783,10 +783,9 @@ func RepoRefByDefaultBranch() func(*Context) {
783783 ctx .Repo .BranchName = ctx .Repo .Repository .DefaultBranch
784784 ctx .Repo .Commit , _ = ctx .Repo .GitRepo .GetBranchCommit (ctx .Repo .BranchName )
785785 ctx .Repo .CommitsCount , _ = ctx .Repo .GetCommitsCount ()
786+ ctx .Data ["RefFullName" ] = ctx .Repo .RefFullName
786787 ctx .Data ["BranchName" ] = ctx .Repo .BranchName
787- ctx .Data ["TreePath" ] = ""
788788 ctx .Data ["CommitsCount" ] = ctx .Repo .CommitsCount
789- ctx .Data ["RefTypeNameSubURL" ] = ctx .Repo .RefTypeNameSubURL ()
790789 }
791790}
792791
Original file line number Diff line number Diff line change 22<div class="ui segments repository-summary tw-mt-1 tw-mb-0">
33 <div class="ui segment sub-menu repository-menu">
44 {{if and (.Permission.CanRead ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo)}}
5- <a class="item muted {{if .PageIsCommits}}active{{end}}" href="{{.RepoLink}}/commits/{{.RefTypeNameSubURL }}">
5+ <a class="item muted {{if .PageIsCommits}}active{{end}}" href="{{.RepoLink}}/commits/{{.RefFullName.RefWebLinkPath }}">
66 {{svg "octicon-history"}} <b>{{ctx.Locale.PrettyNumber .CommitsCount}}</b> {{ctx.Locale.TrN .CommitsCount "repo.commit" "repo.commits"}}
77 </a>
88 <a class="item muted {{if .PageIsBranches}}active{{end}}" href="{{.RepoLink}}/branches">
You can’t perform that action at this time.
0 commit comments