(root: &Path, args: &[&str])
| 55 | } |
| 56 | |
| 57 | fn git(root: &Path, args: &[&str]) -> String { |
| 58 | let output = Command::new("git") |
| 59 | .args(args) |
| 60 | .current_dir(root) |
| 61 | .env("GIT_AUTHOR_NAME", "Sibling Closure Tests") |
| 62 | .env("GIT_AUTHOR_EMAIL", "sibling-closure@example.com") |
| 63 | .env("GIT_COMMITTER_NAME", "Sibling Closure Tests") |
| 64 | .env("GIT_COMMITTER_EMAIL", "sibling-closure@example.com") |
| 65 | .output() |
| 66 | .expect("run git"); |
| 67 | assert!( |
| 68 | output.status.success(), |
| 69 | "git {args:?} failed: {}", |
| 70 | String::from_utf8_lossy(&output.stderr) |
| 71 | ); |
| 72 | String::from_utf8(output.stdout) |
| 73 | .expect("utf8 git output") |
| 74 | .trim() |
| 75 | .to_string() |
| 76 | } |
| 77 | |
| 78 | /// Commit with a controlled committer date (the deterministic shim |
| 79 | /// sequencing's first tie-break), so the sibling lands between the parent |
no test coverage detected