From 55afc1ad21a6c5bebe7f7f8b6df8b0ee4308ba10 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 4 Apr 2017 01:45:57 -0400 Subject: models/repo_diff: move core functions to gogits/git-module --- routers/repo/commit.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers') 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) -- cgit v1.2.3