From c914ece3df29e86729d83447f26723b506128030 Mon Sep 17 00:00:00 2001 From: davidovich Date: Tue, 23 Jul 2019 12:43:21 -0400 Subject: [PATCH] suppress detached head advice This limits urelated output to the console when installing deps --- pkg/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git.go b/pkg/git.go index 2607871..d2cd6f3 100644 --- a/pkg/git.go +++ b/pkg/git.go @@ -45,7 +45,7 @@ func (p *GitPackage) Install(ctx context.Context, dir, version string) (lockVers return "", err } - cmd = exec.CommandContext(ctx, "git", "checkout", version) + cmd = exec.CommandContext(ctx, "git", "-c", "advice.detachedHead=false", "checkout", version) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr