diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2017-12-06 18:54:57 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2017-12-13 19:40:19 +0300 |
commit | 835a5db376a69dce20ba616d480a5a9ab15b2577 (patch) | |
tree | 0ecba5bbfa679966cba50e62b0ff19c4d944fc12 /lib/gitlab/gitaly_client/repository_service.rb | |
parent | 689bc9ea6db102006b548e6176125157955c7f2b (diff) |
Migrate Gitlab::Git::Repository#merge_base_commit to Gitaly
Closes gitaly#808
Diffstat (limited to 'lib/gitlab/gitaly_client/repository_service.rb')
-rw-r--r-- | lib/gitlab/gitaly_client/repository_service.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb index a477d618f63..c1f95396878 100644 --- a/lib/gitlab/gitaly_client/repository_service.rb +++ b/lib/gitlab/gitaly_client/repository_service.rb @@ -69,6 +69,16 @@ module Gitlab response.value end + def find_merge_base(*revisions) + request = Gitaly::FindMergeBaseRequest.new( + repository: @gitaly_repo, + revisions: revisions.map { |r| GitalyClient.encode(r) } + ) + + response = GitalyClient.call(@storage, :repository_service, :find_merge_base, request) + response.base.presence + end + def fetch_source_branch(source_repository, source_branch, local_ref) request = Gitaly::FetchSourceBranchRequest.new( repository: @gitaly_repo, |