diff options
Diffstat (limited to 'routers/repo/single.go')
-rw-r--r-- | routers/repo/single.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/repo/single.go b/routers/repo/single.go index fd4d5290..10b2ae81 100644 --- a/routers/repo/single.go +++ b/routers/repo/single.go @@ -50,6 +50,13 @@ func Single(ctx *middleware.Context, params martini.Params) { } } + commit, err := models.GetLastestCommit(params["username"], params["reponame"]) + if err != nil { + ctx.Handle(200, "repo.Single", err) + return + } + ctx.Data["LatestCommit"] = commit + ctx.Data["Paths"] = Paths ctx.Data["Treenames"] = treenames ctx.Data["IsRepoToolbarSource"] = true |