Commit 3d880d93 authored by Douwe Maan's avatar Douwe Maan

We don't need these checks anymore

parent c72e7155
...@@ -753,17 +753,6 @@ class Repository ...@@ -753,17 +753,6 @@ class Repository
author_email: nil, author_name: nil, author_email: nil, author_name: nil,
start_branch_name: nil, start_project: project) 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( multi_action(
user: user, user: user,
message: message, message: message,
...@@ -1160,14 +1149,6 @@ class Repository ...@@ -1160,14 +1149,6 @@ class Repository
blob_data_at(sha, '.gitlab-ci.yml') blob_data_at(sha, '.gitlab-ci.yml')
end 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 private
def blob_data_at(sha, path) def blob_data_at(sha, path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment