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:
authorSean McGivern <sean@mcgivern.me.uk>2018-03-07 16:46:43 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-03-07 16:46:43 +0300
commitb809f434699f3bc2adb84d0cb59f575cb44b5984 (patch)
treef200aa6028a0fd278729b9923d1af5ee33a835d3 /app/models/environment.rb
parent1da5a103ace9c346758e9525d7f0fa55bab13599 (diff)
parentc277aac9dc1a72eb8b4584ad217996a9d7daaf14 (diff)
Merge branch 'mr-commit-optimization' into 'master'
Use persisted/memoized value for MRs sha's instead of doing git lookups See merge request gitlab-org/gitlab-ce!17555
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 582a7818502..2b0a88ac5b4 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