summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 5175842e5de..a95ab756600 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -359,10 +359,6 @@ class Commit
end
def has_signature?
- if signature_type == :SSH && !ssh_signatures_enabled?
- return false
- end
-
signature_type && signature_type != :NONE
end
@@ -382,10 +378,6 @@ class Commit
@signature_type ||= raw_signature_type || :NONE
end
- def ssh_signatures_enabled?
- Feature.enabled?(:ssh_commit_signatures, project)
- end
-
def signature
strong_memoize(:signature) do
case signature_type
@@ -394,7 +386,7 @@ class Commit
when :X509
Gitlab::X509::Commit.new(self).signature
when :SSH
- Gitlab::Ssh::Commit.new(self).signature if ssh_signatures_enabled?
+ Gitlab::Ssh::Commit.new(self).signature
else
nil
end
@@ -584,9 +576,7 @@ class Commit
private
def expire_note_etag_cache_for_related_mrs
- MergeRequest.includes(target_project: :namespace).by_commit_sha(id).find_each do |mr|
- mr.expire_note_etag_cache
- end
+ MergeRequest.includes(target_project: :namespace).by_commit_sha(id).find_each(&:expire_note_etag_cache)
end
def commit_reference(from, referable_commit_id, full: false)