diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-15 20:03:18 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-15 20:03:18 +0800 |
commit | 3e69c716f0b81b2c3b863d3c8a5e6346b9978fc1 (patch) | |
tree | 8e398a8773be4aace08c10a397755335d72b7514 /app/controllers/concerns/creates_commit.rb | |
parent | cd22fdd531c151cf1bbc307e52c565e86070fe3b (diff) | |
download | gitlab-ce-3e69c716f0b81b2c3b863d3c8a5e6346b9978fc1.tar.gz |
Try if branch_exists? would work, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_18424135
Diffstat (limited to 'app/controllers/concerns/creates_commit.rb')
-rw-r--r-- | app/controllers/concerns/creates_commit.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index 5d11f286e9a..e5c40446314 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -4,7 +4,7 @@ module CreatesCommit def create_commit(service, success_path:, failure_path:, failure_view: nil, success_notice: nil) set_commit_variables - source_branch = @ref if @ref && @repository.find_branch(@ref) + source_branch = @ref if @ref && @repository.branch_exists?(@ref) commit_params = @commit_params.merge( source_project: @project, source_branch: source_branch, |