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
This commit is contained in:
Robert Speicher
2015-10-19 09:16:20 +00:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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