From 114f5ae8907fe5c60bddadca254225769adac4d7 Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Fri, 19 Feb 2021 20:53:34 +0700 Subject: [PATCH] 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. --- kotlin-native/.idea/vcs.xml | 20 +++++++++++++++++++ .../kotlin/testing/native/GitDownloadTask.kt | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 kotlin-native/.idea/vcs.xml diff --git a/kotlin-native/.idea/vcs.xml b/kotlin-native/.idea/vcs.xml new file mode 100644 index 00000000000..abcc2585c24 --- /dev/null +++ b/kotlin-native/.idea/vcs.xml @@ -0,0 +1,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/testing/native/GitDownloadTask.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/testing/native/GitDownloadTask.kt index b576a08e5d4..2fd3507a361 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/testing/native/GitDownloadTask.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/testing/native/GitDownloadTask.kt @@ -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() }