diff options
author | Unknwon <u@gogs.io> | 2015-12-09 20:46:05 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-09 20:46:05 -0500 |
commit | 9a2e43bff28ac92f180109fe900a6997614ea5a8 (patch) | |
tree | 564dbb6fb30c153e43b0e18499d80e7d93dd0bee /routers/repo/repo.go | |
parent | bd5dc626e82e18d3e619d918e579dc130edcd1fa (diff) | |
download | gitea-9a2e43bff28ac92f180109fe900a6997614ea5a8.tar.gz gitea-9a2e43bff28ac92f180109fe900a6997614ea5a8.zip |
move out git module and #1573 send push hook
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index e134fd29e6..c70d55a625 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -12,10 +12,11 @@ import ( "github.com/Unknwon/com" + "github.com/gogits/git-shell" + "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/auth" "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/git" "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/middleware" "github.com/gogits/gogs/modules/setting" @@ -294,21 +295,21 @@ func Download(ctx *middleware.Context) { ) gitRepo := ctx.Repo.GitRepo if gitRepo.IsBranchExist(refName) { - commit, err = gitRepo.GetCommitOfBranch(refName) + commit, err = gitRepo.GetBranchCommit(refName) if err != nil { - ctx.Handle(500, "Download", err) + ctx.Handle(500, "GetBranchCommit", err) return } } else if gitRepo.IsTagExist(refName) { - commit, err = gitRepo.GetCommitOfTag(refName) + commit, err = gitRepo.GetTagCommit(refName) if err != nil { - ctx.Handle(500, "Download", err) + ctx.Handle(500, "GetTagCommit", err) return } } else if len(refName) == 40 { commit, err = gitRepo.GetCommit(refName) if err != nil { - ctx.Handle(404, "Download", nil) + ctx.Handle(404, "GetCommit", nil) return } } else { |