From 013e3937e8e5690f34897a11d0698efe8b8cd66c Mon Sep 17 00:00:00 2001 From: Hang Xie Date: Fri, 8 Nov 2019 06:44:37 -0800 Subject: [PATCH] fix: unknown pathspec on tags (#58) forces to fetch tags from the remote. This was dependent on `git-config` before and led to issues with some users where tags were not be fetched --- pkg/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git.go b/pkg/git.go index 71cc3e0..dc761ec 100644 --- a/pkg/git.go +++ b/pkg/git.go @@ -241,7 +241,7 @@ func (p *GitPackage) Install(ctx context.Context, name, dir, version string) (st } // Attempt shallow fetch at specific revision - cmd = exec.CommandContext(ctx, "git", "fetch", "--depth", "1", "origin", version) + cmd = exec.CommandContext(ctx, "git", "fetch", "--tags", "--depth", "1", "origin", version) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr