Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-01-23 20:42:10 +0300
committerJacob Vosmaer <jacob@gitlab.com>2018-01-25 16:05:11 +0300
commit6d6f7536bd9b5bcbf94dfbe15cc86e84d06527f5 (patch)
tree6b6c62e084b1ce914da742be847d56086b0b6475 /app/models/deployment.rb
parent1f5af51b476a36a72759e7560c125c2b9602b145 (diff)
Look for rugged with static analysis
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index 7bcded5b5e1..3aed071dd49 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -45,14 +45,7 @@ class Deployment < ActiveRecord::Base
def includes_commit?(commit)
return false unless commit
- # Before 8.10, deployments didn't have keep-around refs. Any deployment
- # created before then could have a `sha` referring to a commit that no
- # longer exists in the repository, so just ignore those.
- begin
- project.repository.ancestor?(commit.id, sha)
- rescue Rugged::OdbError
- false
- end
+ project.repository.ancestor?(commit.id, sha)
end
def update_merge_request_metrics!