Set core.autocrlf=false in the build system instead of CI config

This commit is contained in:
bjorn3 2023-01-13 14:41:07 +00:00
parent 9a15db6dd0
commit 890c61216a
2 changed files with 8 additions and 5 deletions

View 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

View 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);
}