Commit cb1538bb authored by Sean McGivern's avatar Sean McGivern

Merge branch 'gitlab-git-duplicate-code' into 'master'

Remove duplicate method definitions

See merge request gitlab-org/gitlab-ce!17478
parents aec3e1dd f45c66e5
...@@ -1433,16 +1433,6 @@ module Gitlab ...@@ -1433,16 +1433,6 @@ module Gitlab
output output
end end
def can_be_merged?(source_sha, target_branch)
gitaly_migrate(:can_be_merged) do |is_enabled|
if is_enabled
gitaly_can_be_merged?(source_sha, find_branch(target_branch).target)
else
rugged_can_be_merged?(source_sha, target_branch)
end
end
end
def last_commit_for_path(sha, path) def last_commit_for_path(sha, path)
gitaly_migrate(:last_commit_for_path) do |is_enabled| gitaly_migrate(:last_commit_for_path) do |is_enabled|
if is_enabled if is_enabled
...@@ -2404,14 +2394,6 @@ module Gitlab ...@@ -2404,14 +2394,6 @@ module Gitlab
.map { |c| commit(c) } .map { |c| commit(c) }
end end
def gitaly_can_be_merged?(their_commit, our_commit)
!gitaly_conflicts_client(our_commit, their_commit).conflicts?
end
def rugged_can_be_merged?(their_commit, our_commit)
!rugged.merge_commits(our_commit, their_commit).conflicts?
end
def last_commit_for_path_by_gitaly(sha, path) def last_commit_for_path_by_gitaly(sha, path)
gitaly_commit_client.last_commit_for_path(sha, path) gitaly_commit_client.last_commit_for_path(sha, path)
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