summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-27 21:15:53 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-27 21:15:53 -0400
commit5344a0300383c4921e4a5810dff58c7686412f0c (patch)
treeb1010551e0c1060f25eb69bdc7f5d66f5f2c844b /routers/repo/repo.go
parent8b700e825b7c39285cbc3e87a48b9bcb77864beb (diff)
downloadgitea-5344a0300383c4921e4a5810dff58c7686412f0c.tar.gz
gitea-5344a0300383c4921e4a5810dff58c7686412f0c.zip
Bug fix
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 3b57cb39f6..e7107ad1cd 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -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)