Skip to content

Commit

Permalink
pkg/vcs: fetch git tags when checking out particular commit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dvyukov committed Jan 4, 2019
1 parent 7da2392 commit 0127e3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/vcs/git.go
Expand Up @@ -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
}

Expand Down

0 comments on commit 0127e3b

Please sign in to comment.