diff options
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r-- | lib/gitlab/diff/file.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/diff/file.rb b/lib/gitlab/diff/file.rb index c9d89d56884..88340f044c0 100644 --- a/lib/gitlab/diff/file.rb +++ b/lib/gitlab/diff/file.rb @@ -329,6 +329,16 @@ module Gitlab lines end + def fully_expanded? + return true if binary? + + lines = diff_lines_for_serializer + + return true if lines.nil? + + lines.none? { |line| line.type.to_s == 'match' } + end + private def total_blob_lines(blob) |