]> git.lizzy.rs Git - rust.git/commitdiff
Set core.autocrlf=false in the build system instead of CI config
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>
Fri, 13 Jan 2023 14:41:07 +0000 (14:41 +0000)
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>
Fri, 13 Jan 2023 15:29:26 +0000 (15:29 +0000)
.github/workflows/main.yml
build_system/utils.rs

index 7dbc8e76efdfff7c4181fb996c8c7016ddc7ea9d..f1badb792cd13c595f13f8f6d51ff8ec74ddb1fd 100644 (file)
@@ -91,10 +91,6 @@ jobs:
         sudo apt-get update
         sudo apt-get install -y gcc-s390x-linux-gnu qemu-user
 
-    - name: Windows setup
-      if: matrix.os == 'windows-latest'
-      run: git config --global core.autocrlf false
-
     - name: Use sparse cargo registry
       run: |
         cat >> ~/.cargo/config.toml <<EOF
index 6d0d9b56514ae94325c3d9ff19e388091138bc3e..afbb1b0e5be4dd02c7fdaccb484bdc48f7cea4bd 100644 (file)
@@ -196,7 +196,14 @@ pub(crate) fn hyperfine_command(
 #[must_use]
 pub(crate) fn git_command<'a>(repo_dir: impl Into<Option<&'a Path>>, cmd: &str) -> Command {
     let mut git_cmd = Command::new("git");
-    git_cmd.arg("-c").arg("user.name=Dummy").arg("-c").arg("user.email=dummy@example.com").arg(cmd);
+    git_cmd
+        .arg("-c")
+        .arg("user.name=Dummy")
+        .arg("-c")
+        .arg("user.email=dummy@example.com")
+        .arg("-c")
+        .arg("core.autocrlf=false")
+        .arg(cmd);
     if let Some(repo_dir) = repo_dir.into() {
         git_cmd.current_dir(repo_dir);
     }