diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-15 08:21:16 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-15 08:21:16 +0800 |
commit | cd22fdd531c151cf1bbc307e52c565e86070fe3b (patch) | |
tree | 0024c574d9cb3e62b57b5f80ee8d41d1ac89a155 /app/controllers/concerns/creates_commit.rb | |
parent | 39d83f72e7af78d503ef278e22eda25f90322f4b (diff) | |
download | gitlab-ce-cd22fdd531c151cf1bbc307e52c565e86070fe3b.tar.gz |
@ref might not exist
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 643b61af1b2..5d11f286e9a 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 @repository.find_branch(@ref) + source_branch = @ref if @ref && @repository.find_branch(@ref) commit_params = @commit_params.merge( source_project: @project, source_branch: source_branch, |