Helper to create a file in the repository and add it.
(repo: &Repository, repo_path: &Path, name: &str, content: &str)
| 50 | |
| 51 | /// Helper to create a file in the repository and add it. |
| 52 | fn create_and_add_file(repo: &Repository, repo_path: &Path, name: &str, content: &str) { |
| 53 | let file_path = repo_path.join(name); |
| 54 | fs::write(&file_path, content).expect("Failed to write file"); |
| 55 | repo.add(name, Default::default()) |
| 56 | .expect("Failed to add file"); |
| 57 | } |
| 58 | |
| 59 | /// Helper to record a change with a message. |
| 60 | fn record_change(repo: &Repository, message: &str) -> Hash { |
no test coverage detected