diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2017-10-10 17:56:04 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-10 17:56:04 +0300 |
commit | 47d19c2de1df14bb3ab00d051be8e4f19f4ed7c4 (patch) | |
tree | a937896d47c846185e397528bdd6fa3e64ae78b9 /app/models | |
parent | 900dd7fa93ee9de3de767aa4bf5baca7e9f83348 (diff) |
Stop using `branch_names.include?` and use `branch_exists?`
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/merge_request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 75e9bdaaa45..972a35dde4d 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -675,13 +675,13 @@ class MergeRequest < ActiveRecord::Base def source_branch_exists? return false unless self.source_project - self.source_project.repository.branch_names.include?(self.source_branch) + self.source_project.repository.branch_exists?(self.source_branch) end def target_branch_exists? return false unless self.target_project - self.target_project.repository.branch_names.include?(self.target_branch) + self.target_project.repository.branch_exists?(self.target_branch) end def merge_commit_message(include_description: false) |