diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-01-23 20:42:10 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-01-25 16:05:11 +0300 |
commit | 6d6f7536bd9b5bcbf94dfbe15cc86e84d06527f5 (patch) | |
tree | 6b6c62e084b1ce914da742be847d56086b0b6475 /lib/gitlab/github_import | |
parent | 1f5af51b476a36a72759e7560c125c2b9602b145 (diff) |
Look for rugged with static analysis
Diffstat (limited to 'lib/gitlab/github_import')
-rw-r--r-- | lib/gitlab/github_import/importer/pull_requests_importer.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/gitlab/github_import/importer/pull_requests_importer.rb b/lib/gitlab/github_import/importer/pull_requests_importer.rb index 5437e32e9f1..e70361c163b 100644 --- a/lib/gitlab/github_import/importer/pull_requests_importer.rb +++ b/lib/gitlab/github_import/importer/pull_requests_importer.rb @@ -57,10 +57,7 @@ module Gitlab end def commit_exists?(sha) - project.repository.lookup(sha) - true - rescue Rugged::Error - false + project.repository.commit(sha).present? end def collection_method |