diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-24 19:35:06 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-29 11:14:41 +0300 |
commit | 87467127b6e0927d56e532f4d6adc4091ff9ef6f (patch) | |
tree | 10e220a998ca2ef41221a6f53b4dc08c762df607 /app/models/repository.rb | |
parent | 5f72aaa303aabdb2258959e84b446074bf8a6915 (diff) | |
download | gitlab-ce-87467127b6e0927d56e532f4d6adc4091ff9ef6f.tar.gz |
replace `is_ancestor?` with `ancestor?`
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 9fb2e2aa306..cb7aba89020 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -944,7 +944,7 @@ class Repository if branch_commit same_head = branch_commit.id == root_ref_commit.id - !same_head && is_ancestor?(branch_commit.id, root_ref_commit.id) + !same_head && ancestor?(branch_commit.id, root_ref_commit.id) else nil end @@ -958,12 +958,12 @@ class Repository nil end - def is_ancestor?(ancestor_id, descendant_id) + def ancestor?(ancestor_id, descendant_id) return false if ancestor_id.nil? || descendant_id.nil? Gitlab::GitalyClient.migrate(:is_ancestor) do |is_enabled| if is_enabled - raw_repository.is_ancestor?(ancestor_id, descendant_id) + raw_repository.ancestor?(ancestor_id, descendant_id) else rugged_is_ancestor?(ancestor_id, descendant_id) end |