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:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-06 09:03:16 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:43:37 +0300
commit4f7ba8f2861b39d3a7697eb99e3fbaaf39f32643 (patch)
treef325fcc37548d2a7bd1f2374b2c1f72f10363857 /lib/gitlab/gpg
parent36c05b311c830aef25ecb7ad4416ac77a5c98651 (diff)
fix memoization
Diffstat (limited to 'lib/gitlab/gpg')
-rw-r--r--lib/gitlab/gpg/commit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/gpg/commit.rb b/lib/gitlab/gpg/commit.rb
index 99d112a51a3..718e77ecadc 100644
--- a/lib/gitlab/gpg/commit.rb
+++ b/lib/gitlab/gpg/commit.rb
@@ -22,7 +22,6 @@ module Gitlab
using_keychain do |gpg_key|
if gpg_key
Gitlab::Gpg::CurrentKeyChain.add(gpg_key.key)
- @verified_signature = nil
end
create_cached_signature!(gpg_key)
@@ -50,6 +49,7 @@ module Gitlab
if gpg_key
Gitlab::Gpg::CurrentKeyChain.add(gpg_key.key)
+ @verified_signature = nil
end
yield gpg_key
@@ -58,7 +58,7 @@ module Gitlab
def verified_signature
@verified_signature ||= GPGME::Crypto.new.verify(@signature_text, signed_text: @signed_text) do |verified_signature|
- return verified_signature
+ break verified_signature
end
end