Commit b9a0f96d authored by Marin Jankovski's avatar Marin Jankovski

Don't show diffs for lfs pointers.

parent ea52a81d
......@@ -6,8 +6,6 @@ class LfsObject < ActiveRecord::Base
mount_uploader :file, LfsObjectUploader
MATCH_FROM_POINTER_REGEX = "(?<=sha256:)([0-9a-f]{64})"
def storage_project(project)
if project && project.forked?
project.forked_from_project
......
......@@ -25,7 +25,7 @@
= "#{diff_file.diff.a_mode}#{diff_file.diff.b_mode}"
.diff-controls
- if blob.text?
- if blob.text? && !blob.lfs_pointer?
= link_to '#', class: 'js-toggle-diff-comments btn btn-sm active has_tooltip', title: "Toggle comments for this file" do
%i.fa.fa-comments
&nbsp;
......@@ -40,7 +40,7 @@
.diff-content.diff-wrap-lines
-# Skipp all non non-supported blobs
- return unless blob.respond_to?('text?')
- if blob.text?
- if blob.text? && !blob.lfs_pointer?
- if diff_view == 'parallel'
= render "projects/diffs/parallel_view", diff_file: diff_file, project: project, blob: blob, index: i
- else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment