0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-19 21:28:33 +02:00
This commit is contained in:
Lunny Xiao 2025-04-13 16:07:38 -07:00
parent ba0e7be187
commit d2b9cab1da
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -920,11 +920,8 @@ func RepoRefByType(detectRefType git.RefType) func(*Context) {
ctx.Data["RefFullName"] = ctx.Repo.RefFullName
ctx.Data["RefTypeNameSubURL"] = ctx.Repo.RefTypeNameSubURL()
ctx.Data["TreePath"] = ctx.Repo.TreePath
ctx.Data["BranchName"] = ctx.Repo.BranchName
ctx.Data["CommitID"] = ctx.Repo.CommitID
ctx.Data["CanCreateBranch"] = ctx.Repo.CanCreateBranch() // only used by the branch selector dropdown: AllowCreateNewRef
// if it's a tag, we just get the commits count from database
@ -957,9 +954,9 @@ func RepoRefByType(detectRefType git.RefType) func(*Context) {
ctx.ServerError("GetCommitsCount", err)
return
}
ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
ctx.Repo.GitRepo.LastCommitCache = git.NewLastCommitCache(ctx.Repo.CommitsCount, ctx.Repo.Repository.FullName(), ctx.Repo.GitRepo, cache.GetCache())
}
ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
ctx.Repo.GitRepo.LastCommitCache = git.NewLastCommitCache(ctx.Repo.CommitsCount, ctx.Repo.Repository.FullName(), ctx.Repo.GitRepo, cache.GetCache())
}
}