Extract a helper method to move repositories

parent 7e262371
......@@ -11,11 +11,7 @@ module Projects
@new_disk_path = project.disk_path
result = move_repository(old_disk_path, new_disk_path)
if move_wiki
result &&= move_repository(old_wiki_disk_path, "#{new_disk_path}.wiki")
end
result = move_repositories
if result
project.write_repository_config
......@@ -34,6 +30,18 @@ module Projects
result
end
private
def move_repositories
result = move_repository(old_disk_path, new_disk_path)
if move_wiki
result &&= move_repository(old_wiki_disk_path, "#{new_disk_path}.wiki")
end
result
end
end
end
end
......
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