summaryrefslogtreecommitdiffstats
path: root/routers/repo/single.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-17 23:04:49 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-17 23:04:49 +0800
commit45a6444b1ead3ebedcf79204cabe44df672f59d5 (patch)
tree3aa7e4d1c274d895588f29106282f09b3e862c8c /routers/repo/single.go
parentbe8baea7ad269eb633a6b5a569b904982021723d (diff)
downloadgitea-45a6444b1ead3ebedcf79204cabe44df672f59d5.tar.gz
gitea-45a6444b1ead3ebedcf79204cabe44df672f59d5.zip
add commits
Diffstat (limited to 'routers/repo/single.go')
-rw-r--r--routers/repo/single.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/routers/repo/single.go b/routers/repo/single.go
index cf64cc6b52..eda71f2925 100644
--- a/routers/repo/single.go
+++ b/routers/repo/single.go
@@ -131,8 +131,15 @@ func Setting(ctx *middleware.Context, params martini.Params) {
ctx.Render.HTML(200, "repo/setting", ctx.Data)
}
-func Commits(ctx *middleware.Context) {
+func Commits(ctx *middleware.Context, params martini.Params) {
ctx.Data["IsRepoToolbarCommits"] = true
+ commits, err := models.GetCommits(params["username"],
+ params["reponame"], params["branchname"])
+ if err != nil {
+ ctx.Render.Error(404)
+ return
+ }
+ ctx.Data["Commits"] = commits
ctx.Render.HTML(200, "repo/commits", ctx.Data)
}