diff options
author | Robert Speicher <robert@gitlab.com> | 2018-05-30 21:22:28 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-05-30 21:22:28 +0000 |
commit | bcdcea1e0701f460406001f3ec89666ee3d9263a (patch) | |
tree | a9743327e5261ca7d130ce83d1235d90dba95910 | |
parent | a8a029268aa71d37a4c264e37870f8bb20bfbdda (diff) | |
parent | 2346dda469965ce4ab109daf707e0570c0521a11 (diff) | |
download | gitlab-ce-bcdcea1e0701f460406001f3ec89666ee3d9263a.tar.gz |
Merge branch 'sh-move-blob-data-at-public' into 'master'
Make Repository#blob_data_at a public method
See merge request gitlab-org/gitlab-ce!19259
-rw-r--r-- | app/models/repository.rb | 16 |
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 |