diff options
author | Sean McGivern <sean@gitlab.com> | 2019-03-21 11:42:33 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-03-21 11:42:33 +0300 |
commit | 1efa960444a2a09bfb8d18c696f23aa281ad7fb3 (patch) | |
tree | 3a3875071b97df381a90eac90e575456e0c75cc2 /lib/gitlab/git/commit.rb | |
parent | d0ea73e5e3486d37ca313736cffd03526c5b6c86 (diff) | |
parent | 5d4e02f17318a21a5c2b4fc588cad066a4cf7e59 (diff) |
Merge branch '58805-allow-incomplete-commit-data-to-be-fetched-from-collection' into 'master'
Enrich commits with full data in CommitCollection
Closes #58805
See merge request gitlab-org/gitlab-ce!26144
Diffstat (limited to 'lib/gitlab/git/commit.rb')
-rw-r--r-- | lib/gitlab/git/commit.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb index 88ff9fbceb4..8fac3621df9 100644 --- a/lib/gitlab/git/commit.rb +++ b/lib/gitlab/git/commit.rb @@ -318,6 +318,10 @@ module Gitlab parent_ids.size > 1 end + def gitaly_commit? + raw_commit.is_a?(Gitaly::GitCommit) + end + def tree_entry(path) return unless path.present? @@ -340,7 +344,7 @@ module Gitlab end def to_gitaly_commit - return raw_commit if raw_commit.is_a?(Gitaly::GitCommit) + return raw_commit if gitaly_commit? message_split = raw_commit.message.split("\n", 2) Gitaly::GitCommit.new( |