summaryrefslogtreecommitdiff
path: root/app/services/projects/hashed_storage
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-09 09:06:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-09 09:06:19 +0000
commit3744bcc0d10d24104e39985b6833a0ec51791c0a (patch)
treeecad3a8435a74bd618acd591762906429f88bfd4 /app/services/projects/hashed_storage
parent78adf0c5cc2534908e3f16a9b8abf06509444cf3 (diff)
downloadgitlab-ce-3744bcc0d10d24104e39985b6833a0ec51791c0a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/projects/hashed_storage')
-rw-r--r--app/services/projects/hashed_storage/base_repository_service.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/services/projects/hashed_storage/base_repository_service.rb b/app/services/projects/hashed_storage/base_repository_service.rb
index f97a28b8c3b..b7e9d3e8791 100644
--- a/app/services/projects/hashed_storage/base_repository_service.rb
+++ b/app/services/projects/hashed_storage/base_repository_service.rb
@@ -20,16 +20,13 @@ module Projects
protected
- # rubocop: disable CodeReuse/ActiveRecord
def has_wiki?
- gitlab_shell.exists?(project.repository_storage, "#{old_wiki_disk_path}.git")
+ gitlab_shell.repository_exists?(project.repository_storage, "#{old_wiki_disk_path}.git")
end
- # rubocop: enable CodeReuse/ActiveRecord
- # rubocop: disable CodeReuse/ActiveRecord
def move_repository(from_name, to_name)
- from_exists = gitlab_shell.exists?(project.repository_storage, "#{from_name}.git")
- to_exists = gitlab_shell.exists?(project.repository_storage, "#{to_name}.git")
+ from_exists = gitlab_shell.repository_exists?(project.repository_storage, "#{from_name}.git")
+ to_exists = gitlab_shell.repository_exists?(project.repository_storage, "#{to_name}.git")
# If we don't find the repository on either original or target we should log that as it could be an issue if the
# project was not originally empty.
@@ -46,7 +43,6 @@ module Projects
gitlab_shell.mv_repository(project.repository_storage, from_name, to_name)
end
- # rubocop: enable CodeReuse/ActiveRecord
def rollback_folder_move
move_repository(new_disk_path, old_disk_path)