diff options
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. |