summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-24 09:52:59 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-24 09:55:01 -0600
commit3d880d9350e4c9e590a83f84b6a5645873800df8 (patch)
treed15479d2bd1e847644258c1125e859a484c7ea43 /app/models
parentc72e71552209aae964e5aa931d435f7e1164e5d1 (diff)
downloadgitlab-ce-3d880d9350e4c9e590a83f84b6a5645873800df8.tar.gz
We don't need these checks anymore
Diffstat (limited to 'app/models')
-rw-r--r--app/models/repository.rb19
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)