summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/models/commit.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
downloadgitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
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)