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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
17d7d3de
Commit
17d7d3de
authored
Jul 07, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add git_blob_load_all_data feature flag
parent
06b94492
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
lib/gitlab/git/blob.rb
lib/gitlab/git/blob.rb
+10
-1
No files found.
lib/gitlab/git/blob.rb
View file @
17d7d3de
...
@@ -175,8 +175,17 @@ module Gitlab
...
@@ -175,8 +175,17 @@ module Gitlab
return
if
@data
==
''
# don't mess with submodule blobs
return
if
@data
==
''
# don't mess with submodule blobs
return
@data
if
@loaded_all_data
return
@data
if
@loaded_all_data
Gitlab
::
GitalyClient
.
migrate
(
:git_blob_load_all_data
)
do
|
is_enabled
|
@data
=
begin
if
is_enabled
Gitlab
::
GitalyClient
::
Blob
.
new
(
repository
).
get_blob
(
oid:
id
,
limit:
-
1
).
data
else
repository
.
lookup
(
id
).
content
end
end
end
@loaded_all_data
=
true
@loaded_all_data
=
true
@data
=
repository
.
lookup
(
id
).
content
@loaded_size
=
@data
.
bytesize
@loaded_size
=
@data
.
bytesize
@binary
=
nil
@binary
=
nil
end
end
...
...
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