mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Bug fix
This commit is contained in:
parent
8b700e825b
commit
5344a03003
4 changed files with 10 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue