Create a test repository with a single recorded file.
()
| 40 | |
| 41 | /// Create a test repository with a single recorded file. |
| 42 | fn create_test_repo() -> (Repository, TempDir, PathBuf) { |
| 43 | let temp = TempDir::new().expect("Failed to create temp dir"); |
| 44 | let repo_path = temp.path().to_path_buf(); |
| 45 | |
| 46 | let repo = Repository::init(&repo_path).expect("Failed to init repository"); |
| 47 | |
| 48 | (repo, temp, repo_path) |
| 49 | } |
| 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) { |
no test coverage detected