lib/gito/project.rb in gito-0.4.6 vs lib/gito/project.rb in gito-0.4.7
- old
+ new
@@ -89,12 +89,12 @@
end
##
## CLONE THE REPOSITORY
##
- def clone(is_temp_folder=false)
- cloneable = cloneable_url
+ def clone(is_temp_folder=false, shell_copy=true)
+ url = cloneable_url
unless is_temp_folder
prefix = Dir.pwd + '/'
else
prefix = Dir.tmpdir + '/gito/'
@@ -103,10 +103,11 @@
@destination_dir = prefix + "#{@destination}"
if File.directory?(@destination_dir)
puts "The folder #{@destination_dir.green} is not empty..."
else
- AppUtils.execute("git clone --depth 1 #{cloneable} #{@destination_dir}")
+ concat = shell_copy ? '--depth 1' : ''
+ AppUtils.execute("git clone #{concat} #{url} #{@destination_dir}")
end
@destination_dir
end