Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-06-07 00:28:06 +0300
committerDouwe Maan <douwe@selenight.nl>2017-06-14 18:12:21 +0300
commit794425456322864f37dbd862aca9bc6b6447591a (patch)
treee04869a293f434756527fcdf80505bcde12bc3f6 /app/models/diff_viewer/text.rb
parent64e85fdaffcd03ef52ff74953b1a4e0caf5a23e8 (diff)
Implement diff viewers
Diffstat (limited to 'app/models/diff_viewer/text.rb')
-rw-r--r--app/models/diff_viewer/text.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/diff_viewer/text.rb b/app/models/diff_viewer/text.rb
new file mode 100644
index 00000000000..98f4b2aea2a
--- /dev/null
+++ b/app/models/diff_viewer/text.rb
@@ -0,0 +1,15 @@
+module DiffViewer
+ class Text < Base
+ include Simple
+ include ServerSide
+
+ self.partial_name = 'text'
+ self.binary = false
+
+ # Since the text diff viewer doesn't render the old and new blobs in full,
+ # we only need the limits related to the actual size of the diff which are
+ # already enforced in Gitlab::Diff::File.
+ self.collapse_limit = nil
+ self.size_limit = nil
+ end
+end