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:
authorAhmad Sherif <me@ahmadsherif.com>2018-02-28 19:56:00 +0300
committerAhmad Sherif <me@ahmadsherif.com>2018-03-01 20:31:31 +0300
commit03f3350f3f679122ce4ceacfc840db6e77763dea (patch)
tree7569d6f1aef894ef13acf262b87b4419f6270d8d /app/models/commit.rb
parent1c2b633b1f4817ca4a3184fb7ff73b1d6b2bbb8f (diff)
Fetch commit signatures from Gitaly in batches
Closes gitaly#1046
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index add5fcf0e79..b9106309142 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -19,6 +19,7 @@ class Commit
attr_accessor :project, :author
attr_accessor :redacted_description_html
attr_accessor :redacted_title_html
+ attr_reader :gpg_commit
DIFF_SAFE_LINES = Gitlab::Git::DiffCollection::DEFAULT_LIMITS[:max_lines]
@@ -110,6 +111,7 @@ class Commit
@raw = raw_commit
@project = project
@statuses = {}
+ @gpg_commit = Gitlab::Gpg::Commit.new(self) if project
end
def id
@@ -452,8 +454,4 @@ class Commit
def merged_merge_request_no_cache(user)
MergeRequestsFinder.new(user, project_id: project.id).find_by(merge_commit_sha: id) if merge_commit?
end
-
- def gpg_commit
- @gpg_commit ||= Gitlab::Gpg::Commit.new(self)
- end
end