diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2018-04-19 11:31:01 +0200 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2018-04-19 13:56:37 +0200 |
commit | 9000626a60c889c76ff1dfc8c6247f15953ca993 (patch) | |
tree | 0d1c6fd369301b146464634b4360dd79002dac30 /app/models/issue.rb | |
parent | 6ae3098eb8f01406190942e8952866dd9af81dde (diff) | |
download | gitlab-ce-9000626a60c889c76ff1dfc8c6247f15953ca993.tar.gz |
Moves Uniquify counter in the initializer
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 51028a404c2..0332bfa9371 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -198,7 +198,7 @@ class Issue < ActiveRecord::Base return to_branch_name unless project.repository.branch_exists?(to_branch_name) start_counting_from = 2 - Uniquify.new.string(-> (counter) { "#{to_branch_name}-#{counter}" }, start_counting_from) do |suggested_branch_name| + Uniquify.new(start_counting_from).string(-> (counter) { "#{to_branch_name}-#{counter}" }) do |suggested_branch_name| project.repository.branch_exists?(suggested_branch_name) end end |