diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2016-06-29 12:11:00 -0300 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-06-29 23:11:00 +0800 |
commit | 743d22669a49b743f1963dc579294a092c4980c1 (patch) | |
tree | dcb537495d87ae31e1b041d999a72c3dfc27b89a /routers/repo/commit.go | |
parent | 84841c8c4b257bd627fcc033112237d40e3a329a (diff) | |
download | gitea-743d22669a49b743f1963dc579294a092c4980c1.tar.gz gitea-743d22669a49b743f1963dc579294a092c4980c1.zip |
Re-work MAX_DIFF_LINES: supress diff per file, not the whole diff (#3174)
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 16f7b63d40..436a06ee9b 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -157,7 +157,8 @@ func Diff(ctx *context.Context) { } diff, err := models.GetDiffCommit(models.RepoPath(userName, repoName), - commitID, setting.Git.MaxGitDiffLines) + commitID, setting.Git.MaxGitDiffLines, + setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles) if err != nil { ctx.Handle(404, "GetDiffCommit", err) return @@ -212,7 +213,8 @@ func CompareDiff(ctx *context.Context) { } diff, err := models.GetDiffRange(models.RepoPath(userName, repoName), beforeCommitID, - afterCommitID, setting.Git.MaxGitDiffLines) + afterCommitID, setting.Git.MaxGitDiffLines, + setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles) if err != nil { ctx.Handle(404, "GetDiffRange", err) return |