diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2017-03-14 09:29:49 +0300 |
---|---|---|
committer | jacopo-beschi-intersail <jacopo.beschi@intersail.it> | 2017-03-21 13:51:53 +0300 |
commit | 7b04b63eeb8e3d6730acec3045a54f95968b3dac (patch) | |
tree | ee8214a00a882236d7bb2756553354fc024d9c59 /app/controllers/projects/application_controller.rb | |
parent | 0eff4f14ccae7d979e6fa20f0bb875e4591351e8 (diff) |
New directory from interface on existing branch
The user can create a new directory on a different branch than the
source branch when the branch already exists.
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r-- | app/controllers/projects/application_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb index e2f81b09adc..f1a93ccb3ad 100644 --- a/app/controllers/projects/application_controller.rb +++ b/app/controllers/projects/application_controller.rb @@ -89,4 +89,9 @@ class Projects::ApplicationController < ApplicationController def builds_enabled return render_404 unless @project.feature_available?(:builds, current_user) end + + def update_ref + branch_exists = @repository.find_branch(@target_branch) + @ref = @target_branch if branch_exists + end end |