From 8c4b6a32fcc5786383904fa1d5cf8b317bec7a7f Mon Sep 17 00:00:00 2001 From: Alexis Reigel Date: Thu, 15 Jun 2017 09:16:50 +0200 Subject: bail if the commit has no signature --- app/models/commit.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/models/commit.rb') 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 -- cgit v1.2.1