summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-06 08:03:16 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 15:43:37 +0200
commit4f7ba8f2861b39d3a7697eb99e3fbaaf39f32643 (patch)
treef325fcc37548d2a7bd1f2374b2c1f72f10363857 /lib
parent36c05b311c830aef25ecb7ad4416ac77a5c98651 (diff)
downloadgitlab-ce-4f7ba8f2861b39d3a7697eb99e3fbaaf39f32643.tar.gz
fix memoization
Diffstat (limited to 'lib')
-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