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-06-12 15:26:13 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:42:04 +0300
commitd1101ec02ec718d0ce15e76217980f6fa21c9089 (patch)
tree31b96475bc1cde5b1f0a80843069b054e6e21db6 /app/models/commit.rb
parent8bd94a7304d392ad030295b5dfcd84c0100eddd1 (diff)
use more descriptive variable names
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 0d50a32d138..9c8edbb097d 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -237,13 +237,16 @@ class Commit
def signature
return @signature if defined?(@signature)
- sig, signed = @raw.signature(project.repository)
- if sig && signed
- GPGME::Crypto.new.verify(sig, signed_text: signed) do |sign|
- @signature = sign
+ @signature = nil
+
+ signature, signed_text = @raw.signature(project.repository)
+ if signature && signed_text
+ GPGME::Crypto.new.verify(signature, signed_text: signed_text) do |verified_signature|
+ @signature = verified_signature
end
end
- @signature ||= nil
+
+ @signature
end
def revert_branch_name