summaryrefslogtreecommitdiffstats
path: root/routers/repo/branch.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-25 20:11:25 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-25 20:11:25 -0400
commit688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f (patch)
tree8adb59c369d1fe1bd41ae7be38785dc613a29a91 /routers/repo/branch.go
parent87854c95a90cf1bebe1bffb833389471fb35f234 (diff)
downloadgitea-688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f.tar.gz
gitea-688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f.zip
Fixed #209
Diffstat (limited to 'routers/repo/branch.go')
-rw-r--r--routers/repo/branch.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/repo/branch.go b/routers/repo/branch.go
index 92265d2e56..2e2ae69254 100644
--- a/routers/repo/branch.go
+++ b/routers/repo/branch.go
@@ -11,9 +11,12 @@ import (
)
func Branches(ctx *middleware.Context, params martini.Params) {
+ ctx.Data["Title"] = "Branches"
+ ctx.Data["IsRepoToolbarBranches"] = true
+
brs, err := ctx.Repo.GitRepo.GetBranches()
if err != nil {
- ctx.Handle(404, "repo.Branches", err)
+ ctx.Handle(500, "repo.Branches", err)
return
} else if len(brs) == 0 {
ctx.Handle(404, "repo.Branches", nil)
@@ -21,7 +24,5 @@ func Branches(ctx *middleware.Context, params martini.Params) {
}
ctx.Data["Branches"] = brs
- ctx.Data["IsRepoToolbarBranches"] = true
-
ctx.HTML(200, "repo/branches")
}