Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
d40970bf
Commit
d40970bf
authored
Apr 13, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Normalize sizes in Gitlab::Git::Blob
parent
41acc87f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/gitlab/git/blob.rb
lib/gitlab/git/blob.rb
+2
-2
No files found.
lib/gitlab/git/blob.rb
View file @
d40970bf
...
@@ -8,7 +8,7 @@ module Gitlab
...
@@ -8,7 +8,7 @@ module Gitlab
# the user. We load as much as we can for encoding detection
# the user. We load as much as we can for encoding detection
# (Linguist) and LFS pointer parsing. All other cases where we need full
# (Linguist) and LFS pointer parsing. All other cases where we need full
# blob data should use load_all_data!.
# blob data should use load_all_data!.
MAX_DATA_DISPLAY_SIZE
=
10
485760
MAX_DATA_DISPLAY_SIZE
=
10
.
megabytes
attr_accessor
:name
,
:path
,
:size
,
:data
,
:mode
,
:id
,
:commit_id
,
:loaded_size
,
:binary
attr_accessor
:name
,
:path
,
:size
,
:data
,
:mode
,
:id
,
:commit_id
,
:loaded_size
,
:binary
...
@@ -153,7 +153,7 @@ module Gitlab
...
@@ -153,7 +153,7 @@ module Gitlab
def
lfs_size
def
lfs_size
if
has_lfs_version_key?
if
has_lfs_version_key?
size
=
data
.
match
(
/(?<=size )([0-9]+)/
)
size
=
data
.
match
(
/(?<=size )([0-9]+)/
)
return
size
[
1
]
if
size
return
size
[
1
]
.
to_i
if
size
end
end
nil
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment