diff options
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r-- | lib/gitlab/git/repository.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 452dba7971d..18eda0279f7 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -451,7 +451,7 @@ module Gitlab # Returns true is +from+ is direct ancestor to +to+, otherwise false def is_ancestor?(from, to) - Gitlab::GitalyClient::Commit.is_ancestor(self, from, to) + gitaly_commit_client.is_ancestor(from, to) end # Return an array of Diff objects that represent the diff @@ -1273,6 +1273,10 @@ module Gitlab @gitaly_ref_client ||= Gitlab::GitalyClient::Ref.new(self) end + def gitaly_commit_client + @gitaly_commit_client ||= Gitlab::GitalyClient::Commit.new(self) + end + # Returns the `Rugged` sorting type constant for a given # sort type key. Valid keys are `:none`, `:topo`, and `:date` def rugged_sort_type(key) |