diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-06-15 09:16:50 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 15:42:53 +0200 |
commit | 8c4b6a32fcc5786383904fa1d5cf8b317bec7a7f (patch) | |
tree | 12b0f04e57b4d5d076ec1715f7d2d2f34dce81d1 /app/models/commit.rb | |
parent | 69e511c4c2a0409fa69658cf95bf5c4072b2b2d0 (diff) | |
download | gitlab-ce-8c4b6a32fcc5786383904fa1d5cf8b317bec7a7f.tar.gz |
bail if the commit has no signature
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 6c5556902ec..ed8b9a79a7a 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -242,11 +242,7 @@ class Commit cached_signature = GpgSignature.find_by(commit_sha: sha) return cached_signature if cached_signature.present? - gpg_commit = Gitlab::Gpg::Commit.new(self) - - return unless gpg_commit.has_signature? - - @signature = gpg_commit.signature + @signature = Gitlab::Gpg::Commit.new(self).signature end def revert_branch_name |