diff options
author | Robert Speicher <robert@gitlab.com> | 2015-10-19 09:16:20 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2015-10-19 09:16:20 +0000 |
commit | 5292b09f95c59cb08bcd8c04ae26128b60a5e5f7 (patch) | |
tree | 0e000b0c5bd6c830cd6a547a460cf99f7f71e6a7 | |
parent | b9a149bc0b2ef55256acf0bc786e13f5093253d4 (diff) | |
parent | cc2b05adf80f55c9f0fe4b453f9f45e2b402c006 (diff) | |
download | gitlab-ce-5292b09f95c59cb08bcd8c04ae26128b60a5e5f7.tar.gz |
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
-rw-r--r-- | app/services/git_push_service.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/reference_extractor.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index e54044365b9..3de7bb9dcaa 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -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 diff --git a/lib/gitlab/reference_extractor.rb b/lib/gitlab/reference_extractor.rb index 333bd059055..da8df8a3025 100644 --- a/lib/gitlab/reference_extractor.rb +++ b/lib/gitlab/reference_extractor.rb @@ -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 |