diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-02 11:16:20 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-03-02 11:16:20 +0000 |
commit | 40c61acb6a9ba84928cebcbce8b57630bd439615 (patch) | |
tree | 7bed6625acfe7ccfa80dcb0d168ec43454cfef6e /app/models | |
parent | a1e58280c21e143dec62a623d0ee227cd3d92d2d (diff) | |
parent | 03f3350f3f679122ce4ceacfc840db6e77763dea (diff) | |
download | gitlab-ce-40c61acb6a9ba84928cebcbce8b57630bd439615.tar.gz |
Merge branch 'feature/fetch-commit-signs-from-gitaly-in-batch' into 'master'
Fetch commit signatures from Gitaly in batches
Closes gitaly#1046
See merge request gitlab-org/gitlab-ce!17456
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/commit.rb | 6 |
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 |