use "git clone --depth 1"

Prefer a shallow clone for builds from git repos, as we don't need all
the historical stuff.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Armando Di Cianno 2011-03-11 16:35:11 -05:00 committed by Adam Vandenberg
parent 9baece866b
commit 79d8d16184

View File

@ -268,7 +268,7 @@ class GitDownloadStrategy <AbstractDownloadStrategy
end end
unless @clone.exist? unless @clone.exist?
safe_system 'git', 'clone', @url, @clone # indeed, leave it verbose safe_system 'git', 'clone', '--depth', '1', @url, @clone # indeed, leave it verbose
else else
puts "Updating #{@clone}" puts "Updating #{@clone}"
Dir.chdir(@clone) do Dir.chdir(@clone) do