From 7b04b63eeb8e3d6730acec3045a54f95968b3dac Mon Sep 17 00:00:00 2001 From: Jacopo Date: Tue, 14 Mar 2017 07:29:49 +0100 Subject: 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. --- app/controllers/projects/application_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/controllers/projects/application_controller.rb') 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 -- cgit v1.2.1