diff options
author | Unknwon <u@gogs.io> | 2017-04-04 01:45:57 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-04 01:45:57 -0400 |
commit | 55afc1ad21a6c5bebe7f7f8b6df8b0ee4308ba10 (patch) | |
tree | 685c2c0e975481a079aee2b146cb8790d7efb6e3 /routers | |
parent | 16c6ca72cd4cd4d686fd5142794f883343c3aed0 (diff) |
models/repo_diff: move core functions to gogits/git-module
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/commit.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 409cee85..bf03d53e 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -141,7 +141,7 @@ func Diff(ctx *context.Context) { commitID, setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles) if err != nil { - ctx.Handle(404, "GetDiffCommit", err) + ctx.NotFoundOrServerError("GetDiffCommit", git.IsErrNotExist, err) return } @@ -180,10 +180,10 @@ func Diff(ctx *context.Context) { } func RawDiff(ctx *context.Context) { - if err := models.GetRawDiff( + if err := git.GetRawDiff( models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name), ctx.Params(":sha"), - models.RawDiffType(ctx.Params(":ext")), + git.RawDiffType(ctx.Params(":ext")), ctx.Resp, ); err != nil { ctx.Handle(500, "GetRawDiff", err) |