summaryrefslogtreecommitdiff
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-04-11 21:23:00 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-04-28 16:44:41 +0200
commitfe771b51fd80dd0926a31091b18a935a01fe1296 (patch)
tree1e1b320fbfb71330476e7c7a89094bc0aaf0f2bc /app/models/repository.rb
parente57545351b22f7d31839c4fc2f4bb760ef0e75a4 (diff)
downloadgitlab-ce-fe771b51fd80dd0926a31091b18a935a01fe1296.tar.gz
Fix Gitaly::Commit#is_ancestor30586-fix-gitaly-is-ancestor
- Upgrade Gitaly-version
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index d02aea49689..feabfa111fb 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -961,15 +961,13 @@ class Repository
end
def is_ancestor?(ancestor_id, descendant_id)
- # NOTE: This feature is intentionally disabled until
- # https://gitlab.com/gitlab-org/gitlab-ce/issues/30586 is resolved
- # Gitlab::GitalyClient.migrate(:is_ancestor) do |is_enabled|
- # if is_enabled
- # raw_repository.is_ancestor?(ancestor_id, descendant_id)
- # else
- merge_base_commit(ancestor_id, descendant_id) == ancestor_id
- # end
- # end
+ Gitlab::GitalyClient.migrate(:is_ancestor) do |is_enabled|
+ if is_enabled
+ raw_repository.is_ancestor?(ancestor_id, descendant_id)
+ else
+ merge_base_commit(ancestor_id, descendant_id) == ancestor_id
+ end
+ end
end
def empty_repo?