From 668e738aebf89122ed18a67f26ef57a88a3129d2 Mon Sep 17 00:00:00 2001 From: Ayose Date: Wed, 6 Oct 2021 20:14:30 +0100 Subject: [PATCH] Use -c to specify the default branch name. Partial revert of 44ffa2ff1faa4651f7e60b63c96f6a87ed88b26c. --- src/summarizer/tests.rs | 3 ++- src/tests/ui/collector.sh | 2 +- src/tests/ui/styles.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/summarizer/tests.rs b/src/summarizer/tests.rs index face22e..6ed99e4 100644 --- a/src/summarizer/tests.rs +++ b/src/summarizer/tests.rs @@ -89,6 +89,7 @@ fn collect_dir_data() { let mut git = Command::new("git"); git.current_dir(root.path()) .stdout(Stdio::null()) + .args(["-c", "init.defaultBranch=x"]) .args(["-c", "user.name=ab"]) .args(["-c", "user.email=a@b"]); @@ -100,7 +101,7 @@ fn collect_dir_data() { }; } - run_git!("init -b x"); + run_git!("init"); run_git!("add ."); run_git!("commit -m x"); diff --git a/src/tests/ui/collector.sh b/src/tests/ui/collector.sh index 209ff75..bfb847e 100644 --- a/src/tests/ui/collector.sh +++ b/src/tests/ui/collector.sh @@ -21,7 +21,7 @@ fallocate -l 140K ddd/dd/file2 seq 20 > ccccc/file3 seq 30 > file4 -git init -b x 1>&2 +git init 1>&2 git add . git -c user.email=x -c user.name=x commit -m X 1>&2 diff --git a/src/tests/ui/styles.sh b/src/tests/ui/styles.sh index e2c6596..1216450 100644 --- a/src/tests/ui/styles.sh +++ b/src/tests/ui/styles.sh @@ -61,7 +61,7 @@ touch N{1..20} mkdir dir0 dir1 fallocate -l100 dir0/x -git init -b x 1>&2 +git init 1>&2 seq 10 > X git add X git -c user.email=x -c user.name=x commit -m X 1>&2