aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/commit.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-09 20:46:05 -0500
committerUnknwon <u@gogs.io>2015-12-09 20:46:05 -0500
commit9a2e43bff28ac92f180109fe900a6997614ea5a8 (patch)
tree564dbb6fb30c153e43b0e18499d80e7d93dd0bee /routers/repo/commit.go
parentbd5dc626e82e18d3e619d918e579dc130edcd1fa (diff)
move out git module and #1573 send push hook
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r--routers/repo/commit.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index 101cb5c5..0f0e2203 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -10,9 +10,10 @@ import (
"github.com/Unknwon/paginater"
+ "github.com/gogits/git-shell"
+
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
- "github.com/gogits/gogs/modules/git"
"github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/modules/setting"
)
@@ -55,7 +56,7 @@ func Commits(ctx *middleware.Context) {
if page <= 1 {
page = 1
}
- ctx.Data["Page"] = paginater.New(commitsCount, git.CommitsRangeSize, page, 5)
+ ctx.Data["Page"] = paginater.New(int(commitsCount), git.CommitsRangeSize, page, 5)
// Both `git log branchName` and `git log commitId` work.
commits, err := ctx.Repo.Commit.CommitsByRange(page)
@@ -123,7 +124,7 @@ func FileHistory(ctx *middleware.Context) {
if page <= 1 {
page = 1
}
- ctx.Data["Page"] = paginater.New(commitsCount, git.CommitsRangeSize, page, 5)
+ ctx.Data["Page"] = paginater.New(int(commitsCount), git.CommitsRangeSize, page, 5)
commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(branchName, fileName, page)
if err != nil {
@@ -159,7 +160,7 @@ func Diff(ctx *middleware.Context) {
parents := make([]string, commit.ParentCount())
for i := 0; i < commit.ParentCount(); i++ {
- sha, err := commit.ParentId(i)
+ sha, err := commit.ParentID(i)
parents[i] = sha.String()
if err != nil {
ctx.Handle(404, "repo.Diff", err)