mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-01 07:37:50 +08:00
Bug fix
This commit is contained in:
@ -85,9 +85,11 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||
ctx.Data["Branches"] = brs
|
||||
|
||||
var commitId string
|
||||
if !models.IsBranchExist(userName, repoName, branchName) {
|
||||
isViewBranch := models.IsBranchExist(userName, repoName, branchName)
|
||||
if !isViewBranch {
|
||||
commitId = branchName
|
||||
}
|
||||
ctx.Data["IsViewBranch"] = isViewBranch
|
||||
|
||||
repoFile, err := models.GetTargetFile(userName, repoName,
|
||||
branchName, commitId, treename)
|
||||
|
Reference in New Issue
Block a user