Commit bcdcea1e authored by Robert Speicher's avatar Robert Speicher

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
parents a8a02926 2346dda4
...@@ -957,6 +957,14 @@ class Repository ...@@ -957,6 +957,14 @@ class Repository
remote_branch: merge_request.target_branch) remote_branch: merge_request.target_branch)
end 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) def squash(user, merge_request)
raw.squash(user, merge_request.id, branch: merge_request.target_branch, raw.squash(user, merge_request.id, branch: merge_request.target_branch,
start_sha: merge_request.diff_start_sha, start_sha: merge_request.diff_start_sha,
...@@ -979,14 +987,6 @@ class Repository ...@@ -979,14 +987,6 @@ class Repository
::Commit.new(commit, @project) if commit ::Commit.new(commit, @project) if commit
end end
def blob_data_at(sha, path)
blob = blob_at(sha, path)
return unless blob
blob.load_all_data!
blob.data
end
def cache def cache
@cache ||= Gitlab::RepositoryCache.new(self) @cache ||= Gitlab::RepositoryCache.new(self)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment