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.
This commit is contained in:
Dmitry Vyukov 2019-01-04 15:00:58 +01:00
parent 7da2392541
commit 0127e3baa7

View File

@ -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
}