diff options
-rw-r--r-- | app/models/repository.rb | 19 |
1 files changed, 0 insertions, 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) |