summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-06-22 12:39:39 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-06-25 09:25:15 +0200
commit9d438edb348bb74dec3c05268dd6d01ad4c14844 (patch)
treef1d3e55fb1432f28c7bc352af2fd7932e892f5d8 /lib
parent2bac2918b2d6f12d94f739f4b6865b9e9221c642 (diff)
downloadgitlab-ce-9d438edb348bb74dec3c05268dd6d01ad4c14844.tar.gz
Anchestor check is Gitaly only now
Closes https://gitlab.com/gitlab-org/gitaly/issues/308
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/repository.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 0904e1c2973..e4d4df8fdfc 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -549,24 +549,9 @@ module Gitlab
end
end
- # Gitaly note: JV: check gitlab-ee before removing this method.
- def rugged_is_ancestor?(ancestor_id, descendant_id)
- return false if ancestor_id.nil? || descendant_id.nil?
-
- rugged_merge_base(ancestor_id, descendant_id) == ancestor_id
- rescue Rugged::OdbError
- false
- end
-
# Returns true is +from+ is direct ancestor to +to+, otherwise false
def ancestor?(from, to)
- Gitlab::GitalyClient.migrate(:is_ancestor) do |is_enabled|
- if is_enabled
- gitaly_commit_client.ancestor?(from, to)
- else
- rugged_is_ancestor?(from, to)
- end
- end
+ gitaly_commit_client.ancestor?(from, to)
end
def merged_branch_names(branch_names = [])