summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-03-26 09:22:14 +0000
committerSean McGivern <sean@gitlab.com>2019-03-26 09:22:14 +0000
commit2ce68fd3a5a286cc5a1c438431df905a532d03fc (patch)
tree502603b16290f0d494cb3057f71add3bff685677 /lib
parent849eb7c6e246b103a6837b969bb2a46aad9065e7 (diff)
parent541a55c934103647c39e33b71da9ff4ab3aada87 (diff)
downloadgitlab-ce-2ce68fd3a5a286cc5a1c438431df905a532d03fc.tar.gz
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!26445
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/commit.rb6
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(