Remove .git directory when downloading googletest sources

Keeping the .git folder in the googletest directory may cause
changing .idea/vcs.xml during IDEA import. .idea/vcs.xml is under
source control, thus changing it litters a current diff.
This commit is contained in:
Ilya Matveev
2021-02-19 20:53:34 +07:00
committed by Vasily Levchenko
parent 276b4f19fa
commit 114f5ae890
2 changed files with 23 additions and 0 deletions
@@ -103,6 +103,9 @@ open class GitDownloadTask @Inject constructor(
// Store info about used revision for the manual up-to-date check.
upToDateChecker.storeRevisionInfo()
// Delete the .git directory of the cloned repo to avoid adding it to IDEA's VCS roots.
outputDirectory.resolve(".git").deleteRecursively()
}