| 1304 | } |
| 1305 | |
| 1306 | fn git_ok(root: &Path, args: &[&str]) -> String { |
| 1307 | let output = Command::new("git") |
| 1308 | .arg("-C") |
| 1309 | .arg(root) |
| 1310 | .args(args) |
| 1311 | .output() |
| 1312 | .expect("run Git"); |
| 1313 | assert!( |
| 1314 | output.status.success(), |
| 1315 | "git {args:?} failed: {}", |
| 1316 | String::from_utf8_lossy(&output.stderr) |
| 1317 | ); |
| 1318 | String::from_utf8_lossy(&output.stdout).trim().to_string() |
| 1319 | } |
| 1320 | |
| 1321 | fn initialized_colocated_repository() -> tempfile::TempDir { |
| 1322 | let root = tempfile::tempdir().expect("tempdir"); |