diff options
Diffstat (limited to 'app/services/create_branch_service.rb')
-rw-r--r-- | app/services/create_branch_service.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/app/services/create_branch_service.rb b/app/services/create_branch_service.rb index f4270a09928..ecb5994fab8 100644 --- a/app/services/create_branch_service.rb +++ b/app/services/create_branch_service.rb @@ -7,15 +7,7 @@ class CreateBranchService < BaseService return failure if failure new_branch = if source_project != @project - repository.fetch_ref( - source_project.repository.path_to_repo, - "refs/heads/#{ref}", - "refs/heads/#{branch_name}" - ) - - repository.after_create_branch - - repository.find_branch(branch_name) + @project.fetch_ref(source_project, branch_name, ref) else repository.add_branch(current_user, branch_name, ref) end |