#175: revert changes, added #binary? method to Grit::Submodule
This commit is contained in:
parent
b297b70ef7
commit
48e0998b93
|
@ -24,7 +24,7 @@
|
||||||
- if commit_diff.b_path.present?
|
- if commit_diff.b_path.present?
|
||||||
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@project, commit_id, commit_diff.b_path)
|
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@project, commit_id, commit_diff.b_path)
|
||||||
.clear
|
.clear
|
||||||
-if commit_diff.diff.present? && !(@project.repo.tree(commit_id) / commit_diff.b_path).try(:binary?)
|
-if commit_diff.diff.present? && !(@project.repo.tree(commit_id) / commit_diff.b_path).binary?
|
||||||
.diff_data=render_diff(commit_diff, :diff_counter => diff_counter)
|
.diff_data=render_diff(commit_diff, :diff_counter => diff_counter)
|
||||||
- rescue Grit::Git::GitTimeout
|
- rescue Grit::Git::GitTimeout
|
||||||
%p= t 'layout.git.repositories.commit_diff_too_big'
|
%p= t 'layout.git.repositories.commit_diff_too_big'
|
||||||
|
|
|
@ -9,6 +9,12 @@ module Grit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class Submodule
|
||||||
|
def binary?
|
||||||
|
false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class Blob
|
class Blob
|
||||||
include Linguist::BlobHelper
|
include Linguist::BlobHelper
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue