Pass -n flag to git clone

There's an explicit git checkout command
issued moments later, so there's no need
to create a working copy during the clone.
This commit is contained in:
Benoit Gagnon 2019-07-24 22:16:00 -04:00
parent 4bea3f2e30
commit c9a5b0a6b2

View file

@ -36,7 +36,7 @@ func NewGitPackage(source *spec.GitSource) Interface {
}
func (p *GitPackage) Install(ctx context.Context, dir, version string) (lockVersion string, err error) {
cmd := exec.CommandContext(ctx, "git", "clone", p.Source.Remote, dir)
cmd := exec.CommandContext(ctx, "git", "clone", "-n", p.Source.Remote, dir)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr