let remote_path = path.display();
Command::new("sh")
.arg("-c")
- .arg(&format!("cd {remote_path} && git init --bare"))
+ .arg(format!("cd {remote_path} && git init --bare"))
.stdout(Stdio::null())
.stderr(Stdio::null())
.status()
fn assert_file_does_not_exist(repo_path: &str, file_path: &str) {
let output = Command::new("sh")
.arg("-c")
- .arg(&format!("cd {repo_path} && git show main:{file_path}"))
+ .arg(format!("cd {repo_path} && git show main:{file_path}"))
.stderr(Stdio::null())
.output()
.expect("Failed to read from repo");
fn assert_file_in_repo_with_contents(repo_path: &str, file_path: &str, contents: &str) {
let output = Command::new("sh")
.arg("-c")
- .arg(&format!("cd {repo_path} && git show main:{file_path}"))
+ .arg(format!("cd {repo_path} && git show main:{file_path}"))
.stderr(Stdio::null())
.output()
.expect("Failed to read from repo");
Command::new("sh")
.arg("-c")
- .arg(&format!(
+ .arg(format!(
"cd {test_dir_display} && \
git clone {repo_path} . && \
echo '{contents}' > {file_path} && \