diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2018-02-28 17:56:00 +0100 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2018-02-28 21:23:05 +0100 |
commit | 7b425c201ef8f7b85f14a08dea4b6125fff7e55f (patch) | |
tree | e0a391883f430ffdd6ac458aa6ee7ddd945cecf9 /app/models/commit.rb | |
parent | 0d3ed41ae532812f2529d31a75aec6b103ee0dfa (diff) | |
download | gitlab-ce-feature/migrate-recursive-tree-entries-fetching.tar.gz |
Fetch commit signatures from Gitaly in batchesfeature/migrate-recursive-tree-entries-fetching
Closes gitaly#1046
Diffstat (limited to 'app/models/commit.rb')
-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 |