summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-05-30 09:35:23 -0700
committerStan Hu <stanhu@gmail.com>2018-05-30 09:35:23 -0700
commit2346dda469965ce4ab109daf707e0570c0521a11 (patch)
tree83400c8e93875140e1a4aaacd92d97bee9f93fa8
parent439adb96dadd49124d080db0db0b0076d2049c6b (diff)
downloadgitlab-ce-2346dda469965ce4ab109daf707e0570c0521a11.tar.gz
Make Repository#blob_data_at a public method
This reduces conflicts with EE, where it is public because it is called in ee/lib/gitlab/ci/external/file/local.rb.
-rw-r--r--app/models/repository.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 6165808cd9a..82cf47ba04e 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -957,6 +957,14 @@ 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,
@@ -979,14 +987,6 @@ class Repository
::Commit.new(commit, @project) if commit
end
- def blob_data_at(sha, path)
- blob = blob_at(sha, path)
- return unless blob
-
- blob.load_all_data!
- blob.data
- end
-
def cache
@cache ||= Gitlab::RepositoryCache.new(self)
end