From 3d880d9350e4c9e590a83f84b6a5645873800df8 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 24 Feb 2017 09:52:59 -0600 Subject: [PATCH] We don't need these checks anymore --- app/models/repository.rb | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index c3fceddb9ca..3bf89ee52a3 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -753,17 +753,6 @@ class Repository author_email: nil, author_name: nil, start_branch_name: nil, start_project: project) - entry = start_project.repository.tree_entry_at(start_branch_name || branch_name, path) - if entry - if entry[:type] == :blob - raise Gitlab::Git::Repository::InvalidBlobName.new( - "Directory already exists as a file") - else - raise Gitlab::Git::Repository::InvalidBlobName.new( - "Directory already exists") - end - end - multi_action( user: user, message: message, @@ -1160,14 +1149,6 @@ class Repository blob_data_at(sha, '.gitlab-ci.yml') end - protected - - def tree_entry_at(branch_name, path) - branch_exists?(branch_name) && - # tree_entry is private - raw_repository.send(:tree_entry, commit(branch_name), path) - end - private def blob_data_at(sha, path) -- GitLab