提交 3d880d93 编写于 作者: D Douwe Maan

We don't need these checks anymore

上级 c72e7155
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册