From 9a2e43bff28ac92f180109fe900a6997614ea5a8 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 9 Dec 2015 20:46:05 -0500 Subject: move out git module and #1573 send push hook --- routers/api/v1/repo/file.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'routers/api') diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index 0279718b..13a6c6c2 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -5,8 +5,9 @@ package repo import ( + "github.com/gogits/git-shell" + "github.com/gogits/gogs/models" - "github.com/gogits/gogs/modules/git" "github.com/gogits/gogs/modules/middleware" "github.com/gogits/gogs/routers/repo" ) @@ -20,7 +21,7 @@ func GetRawFile(ctx *middleware.Context) { blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreeName) if err != nil { - if err == git.ErrNotExist { + if git.IsErrNotExist(err) { ctx.Error(404) } else { ctx.APIError(500, "GetBlobByPath", err) -- cgit v1.2.3