(dir: &Path, args: &[&str])
| 32 | } |
| 33 | |
| 34 | fn git(dir: &Path, args: &[&str]) -> String { |
| 35 | let output = Command::new("git") |
| 36 | .args(args) |
| 37 | .current_dir(dir) |
| 38 | .env("GIT_AUTHOR_NAME", "Logging Tests") |
| 39 | .env("GIT_AUTHOR_EMAIL", "logging@example.com") |
| 40 | .env("GIT_COMMITTER_NAME", "Logging Tests") |
| 41 | .env("GIT_COMMITTER_EMAIL", "logging@example.com") |
| 42 | .output() |
| 43 | .expect("run git"); |
| 44 | assert!(output.status.success(), "git {args:?}: {output:?}"); |
| 45 | String::from_utf8(output.stdout).unwrap().trim().to_string() |
| 46 | } |
| 47 | |
| 48 | fn default_log_dir(home: &Path) -> PathBuf { |
| 49 | home.join(".atomic").join("logs") |
no test coverage detected