summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-10-07 14:57:09 +0200
committerPietro Albini <pietro@pietroalbini.org>2019-10-25 16:03:11 +0200
commite0b1b3bbc1c796e3a35a723e875ec82c8ad371c0 (patch)
tree1a64c62eab2eb8a7564dfd07d45009c5502677f6 /src/ci/scripts
parent6dd074a8f6bbf126492e15ea2eadaed54ac3d887 (diff)
downloadrust-e0b1b3bbc1c796e3a35a723e875ec82c8ad371c0.tar.gz
rust-e0b1b3bbc1c796e3a35a723e875ec82c8ad371c0.zip
ci: extract disabling git crlf handling into a script
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/disable-git-crlf-conversion.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ci/scripts/disable-git-crlf-conversion.sh b/src/ci/scripts/disable-git-crlf-conversion.sh
new file mode 100755
index 00000000000..836145fbb8e
--- /dev/null
+++ b/src/ci/scripts/disable-git-crlf-conversion.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+# Disable automatic line ending conversion, which is enabled by default on
+# Azure's Windows image. Having the conversion enabled caused regressions both
+# in our test suite (it broke miri tests) and in the ecosystem, since we
+# started shipping install scripts with CRLF endings instead of the old LF.
+#
+# Note that we do this a couple times during the build as the PATH and current
+# user/directory change, e.g. when mingw is enabled.
+
+set -euo pipefail
+IFS=$'\n\t'
+
+git config --replace-all --global core.autocrlf false