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:
Diffstat (limited to 'app/models/commit_collection.rb')
-rw-r--r--app/models/commit_collection.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/commit_collection.rb b/app/models/commit_collection.rb
index 07c49ed48e6..a3ee8e4f364 100644
--- a/app/models/commit_collection.rb
+++ b/app/models/commit_collection.rb
@@ -86,9 +86,9 @@ class CommitCollection
# Batch load full Commits from the repository
# and map to a Hash of id => Commit
- replacements = Hash[unenriched.map do |c|
- [c.id, Commit.lazy(container, c.id)]
- end.compact]
+ replacements = unenriched.each_with_object({}) do |c, result|
+ result[c.id] = Commit.lazy(container, c.id)
+ end.compact
# Replace the commits, keeping the same order
@commits = @commits.map do |original_commit|