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
Léo-Paul Géneau
gitlab-ce
Commits
9cc15172
Commit
9cc15172
authored
Oct 06, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean hierarchy of calls between models and Gitalb::Git for blob search
parent
f72598b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app/models/repository.rb
app/models/repository.rb
+1
-3
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+4
-0
No files found.
app/models/repository.rb
View file @
9cc15172
...
...
@@ -468,9 +468,7 @@ class Repository
end
def
blob_at
(
sha
,
path
)
unless
Gitlab
::
Git
.
blank_ref?
(
sha
)
Blob
.
decorate
(
Gitlab
::
Git
::
Blob
.
find
(
self
,
sha
,
path
),
project
)
end
Blob
.
decorate
(
raw_repository
.
blob_at
(
sha
,
path
),
project
)
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
nil
end
...
...
lib/gitlab/git/repository.rb
View file @
9cc15172
...
...
@@ -1092,6 +1092,10 @@ module Gitlab
popen
(
args
,
@path
).
last
.
zero?
end
def
blob_at
(
sha
,
path
)
Gitlab
::
Git
::
Blob
.
find
(
self
,
sha
,
path
)
unless
Gitlab
::
Git
.
blank_ref?
(
sha
)
end
def
gitaly_repository
Gitlab
::
GitalyClient
::
Util
.
repository
(
@storage
,
@relative_path
,
@gl_repository
)
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