From 5344a0300383c4921e4a5810dff58c7686412f0c Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 27 Mar 2014 21:15:53 -0400 Subject: Bug fix --- routers/repo/repo.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routers/repo/repo.go') diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 3b57cb39..e7107ad1 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) -- cgit v1.2.3