From 0127e3baa7b78ca59d4b1ebb3482a270c6c1c2af Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 4 Jan 2019 15:00:58 +0100 Subject: [PATCH] pkg/vcs: fetch git tags when checking out particular commit Fetch of a named remote does not seem to fetch all tags. This is a problem for linux-next as it contains lots of tags that are not on the main branch because of periodic rebases. --- pkg/vcs/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/vcs/git.go b/pkg/vcs/git.go index 8a7cf4037cb..45a7e340cae 100644 --- a/pkg/vcs/git.go +++ b/pkg/vcs/git.go @@ -98,7 +98,7 @@ func (git *git) fetchRemote(repo string) error { repoHash := hash.String([]byte(repo)) // Ignore error as we can double add the same remote and that will fail. runSandboxed(git.dir, "git", "remote", "add", repoHash, repo) - _, err := runSandboxed(git.dir, "git", "fetch", repoHash) + _, err := runSandboxed(git.dir, "git", "fetch", "-t", repoHash) return err }