Skip to content
Snippets Groups Projects
Commit d40970bf authored by Douwe Maan's avatar Douwe Maan
Browse files

Normalize sizes in Gitlab::Git::Blob

parent 41acc87f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -8,7 +8,7 @@ module Gitlab
# the user. We load as much as we can for encoding detection
# (Linguist) and LFS pointer parsing. All other cases where we need full
# blob data should use load_all_data!.
MAX_DATA_DISPLAY_SIZE = 10485760
MAX_DATA_DISPLAY_SIZE = 10.megabytes
 
attr_accessor :name, :path, :size, :data, :mode, :id, :commit_id, :loaded_size, :binary
 
Loading
Loading
@@ -153,7 +153,7 @@ module Gitlab
def lfs_size
if has_lfs_version_key?
size = data.match(/(?<=size )([0-9]+)/)
return size[1] if size
return size[1].to_i if size
end
 
nil
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment