1
0
Fork 0

fix: force-update tags on git fetch to handle rewritten remote tags

This commit is contained in:
thibaud-leclere 2026-05-11 11:29:05 +02:00
parent c1d3ea0a30
commit c1d3345a01

View file

@ -50,7 +50,7 @@ final class GitSynchronizer
$this->runGit(['git', '-C', $repositoryDir, 'remote', 'set-url', 'origin', $mapping->getRepositoryUrl()], null, $env); $this->runGit(['git', '-C', $repositoryDir, 'remote', 'set-url', 'origin', $mapping->getRepositoryUrl()], null, $env);
} }
$this->runGit(['git', '-C', $repositoryDir, 'fetch', '--prune', '--tags', 'origin', $mapping->getGitRef()], null, $env); $this->runGit(['git', '-C', $repositoryDir, 'fetch', '--prune', '--tags', '--force', 'origin', $mapping->getGitRef()], null, $env);
$this->runGit(['git', '-C', $repositoryDir, 'checkout', '--force', 'FETCH_HEAD'], null, $env); $this->runGit(['git', '-C', $repositoryDir, 'checkout', '--force', 'FETCH_HEAD'], null, $env);
return $repositoryDir; return $repositoryDir;