diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-06 09:03:16 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:43:37 +0300 |
commit | 4f7ba8f2861b39d3a7697eb99e3fbaaf39f32643 (patch) | |
tree | f325fcc37548d2a7bd1f2374b2c1f72f10363857 /lib | |
parent | 36c05b311c830aef25ecb7ad4416ac77a5c98651 (diff) |
fix memoization
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/gpg/commit.rb | 4 |
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 |