summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/ci/pipeline.rb2
-rw-r--r--lib/gitlab/gitaly_client.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index bbde0cdd465..be801f15cc4 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -781,7 +781,7 @@ module Ci
end
def git_ref
- strong_memoize(:git_pref) do
+ strong_memoize(:git_ref) do
if merge_request_event?
##
# In the future, we're going to change this ref to
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index bc2f7693fdc..42195f566eb 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -302,6 +302,7 @@ module Gitlab
# branch, this method allows caching of the ref name directly.
def self.allow_ref_name_caching
return yield unless Gitlab::SafeRequestStore.active?
+ return yield if ref_name_caching_allowed?
begin
Gitlab::SafeRequestStore[:allow_ref_name_caching] = true