(repo: &Repository, path: &str, text: &str)
| 17 | .unwrap(); |
| 18 | } |
| 19 | fn write(repo: &Repository, path: &str, text: &str) { |
| 20 | let full = repo.root().join(path); |
| 21 | let exists = full.exists(); |
| 22 | std::fs::write(full, text).unwrap(); |
| 23 | if !exists { |
| 24 | repo.add( |
| 25 | repo.require_working_copy_id().unwrap(), |
| 26 | path, |
| 27 | TrackingOptions::default(), |
| 28 | ) |
| 29 | .unwrap(); |
| 30 | } |
| 31 | } |
| 32 | fn command(root: &Path, args: &[&str]) -> std::process::Output { |
| 33 | Command::new(env!("CARGO_BIN_EXE_atomic")) |
| 34 | .current_dir(root) |
no test coverage detected