diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-07-04 10:39:59 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-04 10:39:59 +0300 |
commit | 78708b193216d7a388e891dd6f240561ff9d7d7f (patch) | |
tree | 9500432ff8aebc2b3ff6fd3394358514036b97d3 /lib/gitlab/git/commit.rb | |
parent | 98eb0578a092c33ee06a10bf98bb42e7f51b82dd (diff) |
Make more Gitaly features mandatory
Diffstat (limited to 'lib/gitlab/git/commit.rb')
-rw-r--r-- | lib/gitlab/git/commit.rb | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb index c67826da1d2..36d56e411d8 100644 --- a/lib/gitlab/git/commit.rb +++ b/lib/gitlab/git/commit.rb @@ -63,12 +63,8 @@ module Gitlab # This saves us an RPC round trip. return nil if commit_id.include?(':') - commit = repo.gitaly_migrate(:find_commit) do |is_enabled| - if is_enabled - repo.gitaly_commit_client.find_commit(commit_id) - else - rugged_find(repo, commit_id) - end + commit = repo.wrapped_gitaly_errors do + repo.gitaly_commit_client.find_commit(commit_id) end decorate(repo, commit) if commit @@ -78,12 +74,6 @@ module Gitlab nil end - def rugged_find(repo, commit_id) - obj = repo.rev_parse_target(commit_id) - - obj.is_a?(Rugged::Commit) ? obj : nil - end - # Get last commit for HEAD # # Ex. |