Skip to content

Commit 480bb7c

Browse files
committed
Force JGit to clone Scala.js sources with autocrlf=false.
1 parent ae33b1f commit 480bb7c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

project/Build.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,7 @@ object Build {
935935

936936
fetchScalaJSSource := {
937937
import org.eclipse.jgit.api._
938+
import org.eclipse.jgit.lib._
938939

939940
val s = streams.value
940941
val ver = scalaJSVersion
@@ -946,12 +947,14 @@ object Build {
946947
new CloneCommand()
947948
.setDirectory(trgDir)
948949
.setURI("https://github.com/scala-js/scala-js.git")
950+
.setNoCheckout(true)
949951
.call()
950952
}
951953

952954
// Checkout proper ref. We do this anyway so we fail if something is wrong
953955
val git = Git.open(trgDir)
954956
s.log.info(s"Checking out Scala.js source version $ver")
957+
git.getRepository().getConfig().setEnum("core", null, "autocrlf", CoreConfig.AutoCRLF.FALSE)
955958
git.checkout().setName(s"v$ver").call()
956959

957960
trgDir

0 commit comments

Comments
 (0)