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:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-10-07 02:47:06 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-10-13 04:03:09 +0300
commit9cc15172deaa4582c5fd956cc163539041d018b1 (patch)
tree16bb6e915c3cc96171b637c942eac5a839ffe346 /lib/gitlab/git/repository.rb
parentf72598b659871a3d4e8ef1905918067522ba2a29 (diff)
Clean hierarchy of calls between models and Gitalb::Git for blob search
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index a6b2d189f18..b705c92d686 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -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