diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-09-07 22:37:44 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-09-07 22:37:44 +0300 |
commit | 1a53f017b4c2106da3425f3dcbe40fb95fd44bbf (patch) | |
tree | ee907b8c21841500da9e1e489c0f26fe19a14efb /app/models/repository.rb | |
parent | eca73d2b30a62876a3148bd1a8b1dfd6d48977fe (diff) |
Make Repository#blob_data_at public
CE mirror of 17de13ada1a98da060802c55889489a512183cd1
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 4b479f047ed..96d25e38cbe 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -980,10 +980,6 @@ class Repository blob_data_at(sha, '.gitlab/route-map.yml') end - def fetch_file_for(sha, path_to_file) - blob_data_at(sha, path_to_file) - end - def gitlab_ci_yml_for(sha, path = '.gitlab-ci.yml') blob_data_at(sha, path) end @@ -1003,14 +999,6 @@ class Repository remote_branch: merge_request.target_branch) end - def blob_data_at(sha, path) - blob = blob_at(sha, path) - return unless blob - - blob.load_all_data! - blob.data - end - def squash(user, merge_request) raw.squash(user, merge_request.id, branch: merge_request.target_branch, start_sha: merge_request.diff_start_sha, @@ -1019,6 +1007,14 @@ class Repository message: merge_request.title) end + def blob_data_at(sha, path) + blob = blob_at(sha, path) + return unless blob + + blob.load_all_data! + blob.data + end + private # TODO Generice finder, later split this on finders by Ref or Oid |