Commit 5707aaf3 authored by Robert Speicher's avatar Robert Speicher Committed by Robert Speicher

Merge branch 'hash-block-return' into 'master'

Fix bug where a push would only create cross references from the first commit.

Apparently we can't `return` from a `Hash.new` block. Who knew.

See merge request !1638
parent cc0978df
......@@ -79,7 +79,7 @@ class GitPushService
authors = Hash.new do |hash, commit|
email = commit.author_email
return hash[email] if hash.has_key?(email)
next hash[email] if hash.has_key?(email)
hash[email] = commit_user(commit)
end
......
......@@ -27,7 +27,7 @@ module Gitlab
def references
@references ||= Hash.new do |references, type|
type = type.to_sym
return references[type] if references.has_key?(type)
next references[type] if references.has_key?(type)
references[type] = pipeline_result(type)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment