diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-12-08 15:22:32 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-12-08 15:22:32 +0800 |
commit | 4f94053c21196b3445c117130e3556463e4ca1d0 (patch) | |
tree | e8527101d1ee8c63686b57b57417aa5caa92edf1 /app/controllers | |
parent | ae5b935b2888f7721e424cf41e2963e1483d8bb5 (diff) | |
download | gitlab-ce-4f94053c21196b3445c117130e3556463e4ca1d0.tar.gz |
We still need it for empty repo for web UI!
We shouldn't pass a non-existing branch to source_branch.
Checkout test for:
* spec/features/tags/master_views_tags_spec.rb:24
* spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb:13
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/concerns/creates_commit.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index dacb5679dd3..5d11f286e9a 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -4,9 +4,10 @@ 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) commit_params = @commit_params.merge( source_project: @project, - source_branch: @ref, + source_branch: source_branch, target_branch: @target_branch ) |