mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-20 10:06:04 +10:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user