Commit 9dc56bd4 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'dm-rugged-is-ancestor' into 'master'

Use rugged_is_ancestor? instead of Gitaly when it is called inside a loop

Closes gitlab-com/infrastructure#2138

See merge request !2696
parents 79ed8e83 b604bb55
......@@ -989,7 +989,7 @@ class Repository
upstream_commit = commit("refs/remotes/#{MIRROR_REMOTE}/#{branch_name}")
if upstream_commit
!is_ancestor?(branch_commit.id, upstream_commit.id)
!rugged_is_ancestor?(branch_commit.id, upstream_commit.id)
else
false
end
......@@ -1000,7 +1000,7 @@ class Repository
upstream_commit = commit("refs/remotes/#{remote_ref}/#{branch_name}")
if upstream_commit
!is_ancestor?(upstream_commit.id, branch_commit.id)
!rugged_is_ancestor?(upstream_commit.id, branch_commit.id)
else
false
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