diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-24 20:52:43 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-29 11:14:42 +0300 |
commit | 10ae0d8316bd9ae5aa1ce46fcea3ec8f01a3b336 (patch) | |
tree | 2b9a0156b7eb07c6b7f910b1bb8d0ca6a6d7eb05 | |
parent | 90112f57d26a21a6c219e24367b7ef91d93858ad (diff) | |
download | gitlab-ce-10ae0d8316bd9ae5aa1ce46fcea3ec8f01a3b336.tar.gz |
replace `is_ancestor` with `ancestor?`
-rw-r--r-- | lib/gitlab/checks/force_push.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/git/repository.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/gitaly_client/commit_service.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/checks/force_push.rb b/lib/gitlab/checks/force_push.rb index 714464fd5e7..dc5d285ea65 100644 --- a/lib/gitlab/checks/force_push.rb +++ b/lib/gitlab/checks/force_push.rb @@ -12,7 +12,7 @@ module Gitlab !project .repository .gitaly_commit_client - .is_ancestor(oldrev, newrev) + .ancestor?(oldrev, newrev) else Gitlab::Git::RevList.new( path_to_repo: project.repository.path_to_repo, diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index dce3a9b2d37..03e2bec84dd 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -440,7 +440,7 @@ module Gitlab # Returns true is +from+ is direct ancestor to +to+, otherwise false def ancestor?(from, to) - gitaly_commit_client.is_ancestor(from, to) + gitaly_commit_client.ancestor?(from, to) end # Return an array of Diff objects that represent the diff diff --git a/lib/gitlab/gitaly_client/commit_service.rb b/lib/gitlab/gitaly_client/commit_service.rb index 57f42bd35ee..21a32a7e0db 100644 --- a/lib/gitlab/gitaly_client/commit_service.rb +++ b/lib/gitlab/gitaly_client/commit_service.rb @@ -22,7 +22,7 @@ module Gitlab end end - def is_ancestor(ancestor_id, child_id) + def ancestor?(ancestor_id, child_id) request = Gitaly::CommitIsAncestorRequest.new( repository: @gitaly_repo, ancestor_id: ancestor_id, |