diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-11 17:40:59 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-18 12:30:46 +0100 |
commit | 3f0d780c19d821e74a4a89634ada10dedec0dbeb (patch) | |
tree | 0a0b57dc7d57ea039d3678fca8aa2b8142c7d592 /lib | |
parent | bdbc9884348515f71530efc2759c05d794f8547e (diff) | |
download | gitlab-ce-3f0d780c19d821e74a4a89634ada10dedec0dbeb.tar.gz |
Show a notice for diffs that are too largehide-large-diffs
This builds on the changes introduced in
https://gitlab.com/gitlab-org/gitlab_git/merge_requests/72 and results
in merge requests with large diffs (e.g. due to them containing minified
CSS) loading much faster.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/file.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb index faa2830c16e..d2e85cabf72 100644 --- a/lib/gitlab/diff/file.rb +++ b/lib/gitlab/diff/file.rb @@ -24,6 +24,10 @@ module Gitlab @lines ||= parser.parse(raw_diff.each_line).to_a end + def too_large? + diff.too_large? + end + def highlighted_diff_lines Gitlab::Diff::Highlight.new(self).highlight end |