summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-10-23 14:16:10 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-10-24 14:31:52 -0300
commita64601b9298d4b79bfc5d4f782b4dcc79ff33b74 (patch)
treeffeffae342bff5a8de96922d35d90c151bac546b /lib
parent00c15cc27c33dd387069fce5777beb29d01f55ac (diff)
downloadgitlab-ce-a64601b9298d4b79bfc5d4f782b4dcc79ff33b74.tar.gz
Move all rugged operation for ff_merge inside Gitlab::Gitgitaly-ff-merge-preparation
We also delete some unused code related to the aforementioned feature.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/repository.rb10
-rw-r--r--lib/gitlab/git_access.rb4
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 59a54b48ed9..95265b41878 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -745,6 +745,16 @@ module Gitlab
nil
end
+ def ff_merge(user, source_sha, target_branch)
+ OperationService.new(user, self).with_branch(target_branch) do |our_commit|
+ raise ArgumentError, 'Invalid merge target' unless our_commit
+
+ source_sha
+ end
+ rescue Rugged::ReferenceError
+ raise ArgumentError, 'Invalid merge source'
+ end
+
def revert(user:, commit:, branch_name:, message:, start_branch_name:, start_repository:)
OperationService.new(user, self).with_branch(
branch_name,
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 42b59c106e2..8998c4b1a83 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -215,10 +215,6 @@ module Gitlab
).exec
end
- def matching_merge_request?(newrev, branch_name)
- Checks::MatchingMergeRequest.new(newrev, branch_name, project).match?
- end
-
def deploy_key
actor if deploy_key?
end