summaryrefslogtreecommitdiff
path: root/app/models/environment.rb
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2018-03-06 00:03:48 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2018-03-06 16:05:34 -0300
commitbc365bd15a0ec0317a4fce71d024397f26ab56c5 (patch)
tree74e8dce48c7430583033375c303fa54eb40ab5aa /app/models/environment.rb
parent49f72d06654bd7bdea259154e1092a53aab57acc (diff)
downloadgitlab-ce-bc365bd15a0ec0317a4fce71d024397f26ab56c5.tar.gz
Use persisted/memoized value for MRs shas instead of doing git lookups
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r--app/models/environment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb
index f78c21aebe5..6f7dabdfefe 100644
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -99,8 +99,8 @@ class Environment < ActiveRecord::Base
folder_name == "production"
end
- def first_deployment_for(commit)
- ref = project.repository.ref_name_for_sha(ref_path, commit.sha)
+ def first_deployment_for(commit_sha)
+ ref = project.repository.ref_name_for_sha(ref_path, commit_sha)
return nil unless ref