diff options
Diffstat (limited to 'ruby/vendor/gitlab_git/lib/gitlab/git/commit.rb')
-rw-r--r-- | ruby/vendor/gitlab_git/lib/gitlab/git/commit.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ruby/vendor/gitlab_git/lib/gitlab/git/commit.rb b/ruby/vendor/gitlab_git/lib/gitlab/git/commit.rb index 89f761dd5..c9806cdb8 100644 --- a/ruby/vendor/gitlab_git/lib/gitlab/git/commit.rb +++ b/ruby/vendor/gitlab_git/lib/gitlab/git/commit.rb @@ -60,6 +60,9 @@ module Gitlab # Some weird thing? return nil unless commit_id.is_a?(String) + # 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) |