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-08 00:07:57 +0300
committerDouwe Maan <douwe@selenight.nl>2017-06-08 20:49:03 +0300
commit370bc86fb007c1683495bdf4082bf5442b517895 (patch)
tree3b435d88b5d18b96ca0ffb26f8a1618fba342bcc /lib/gitlab/git/blob.rb
parent7bd5b8c1c709163547ec865484b341211158ebf1 (diff)
Detect if file that appears to be text in the first 1024 bytes is actually binary afer loading all data
Diffstat (limited to 'lib/gitlab/git/blob.rb')
-rw-r--r--lib/gitlab/git/blob.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/git/blob.rb b/lib/gitlab/git/blob.rb
index d60e607b02b..33a7624e303 100644
--- a/lib/gitlab/git/blob.rb
+++ b/lib/gitlab/git/blob.rb
@@ -123,6 +123,7 @@ module Gitlab
@loaded_all_data = true
@data = repository.lookup(id).content
@loaded_size = @data.bytesize
+ @binary = nil
end
def name