Skip to content
Snippets Groups Projects
Commit 4e65d085 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Merge pull request #8299 from dandric-activevideo/bug8271

Fix for #8271: Correctly restore empty repositories.
parents 6adc313a 4a5044e3
No related branches found
No related tags found
No related merge requests found
Loading
@@ -59,7 +59,13 @@ module Backup
Loading
@@ -59,7 +59,13 @@ module Backup
   
project.namespace.ensure_dir_exist if project.namespace project.namespace.ensure_dir_exist if project.namespace
   
if system(*%W(git clone --bare #{path_to_bundle(project)} #{path_to_repo(project)}), silent) if File.exists?(path_to_bundle(project))
cmd = %W(git clone --bare #{path_to_bundle(project)} #{path_to_repo(project)})
else
cmd = %W(git init --bare #{path_to_repo(project)})
end
if system(*cmd, silent)
puts "[DONE]".green puts "[DONE]".green
else else
puts "[FAILED]".red puts "[FAILED]".red
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment