aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r--routers/repo/commit.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index 5a7bb589..fed1a6ba 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -52,6 +52,10 @@ func Commits(ctx *middleware.Context, params martini.Params) {
//both `git log branchName` and `git log commitId` work
commits, err := models.GetCommitsByRange(repoPath, branchName, page)
+ if err != nil {
+ ctx.Handle(500, "repo.Commits(get commits)", err)
+ return
+ }
ctx.Data["Username"] = userName
ctx.Data["Reponame"] = repoName