Page: Commits and fix #249

This commit is contained in:
Unknwon 2014-09-23 15:30:04 -04:00
parent 93ee0838eb
commit 5bbeeb0f1b
13 changed files with 160 additions and 40 deletions

View file

@ -56,12 +56,14 @@ func Commits(ctx *middleware.Context) {
}
// Both `git log branchName` and `git log commitId` work.
ctx.Data["Commits"], err = ctx.Repo.Commit.CommitsByRange(page)
commits, err := ctx.Repo.Commit.CommitsByRange(page)
if err != nil {
ctx.Handle(500, "CommitsByRange", err)
return
}
commits = models.ValidCommitsWithEmails(commits)
ctx.Data["Commits"] = commits
ctx.Data["Username"] = userName
ctx.Data["Reponame"] = repoName
ctx.Data["CommitCount"] = commitsCount