Skip to content

Commit ec87560

Browse files
committed
Force JGit to clone Scala.js sources with autocrlf=false.
1 parent c1eb964 commit ec87560

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
@@ -947,6 +947,7 @@ object Build {
947947

948948
fetchScalaJSSource := {
949949
import org.eclipse.jgit.api._
950+
import org.eclipse.jgit.lib._
950951

951952
val s = streams.value
952953
val ver = scalaJSVersion
@@ -958,12 +959,14 @@ object Build {
958959
new CloneCommand()
959960
.setDirectory(trgDir)
960961
.setURI("https://github.com/scala-js/scala-js.git")
962+
.setNoCheckout(true)
961963
.call()
962964
}
963965

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

969972
trgDir

0 commit comments

Comments
 (0)