Skip to content
Snippets Groups Projects
Unverified Commit 9d438edb authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Anchestor check is Gitaly only now

parent 2bac2918
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -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 = [])
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment