GitDownloadStrategy: avoid unnecessary checkout

By default, git checks out the fetched ref after cloning the repo, but
this is unnecessary as we explicitly check out the desired ref during
staging. This also silences some unnecessarily confusing output.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-10-15 00:55:57 -05:00
parent 799c164cd9
commit bab29bab72

View File

@ -342,7 +342,7 @@ class GitDownloadStrategy < AbstractDownloadStrategy
unless @clone.exist?
# Note: first-time checkouts are always done verbosely
clone_args = [@@git, 'clone']
clone_args = [@@git, 'clone', '--no-checkout']
clone_args << '--depth' << '1' if support_depth?
case @spec