Create a test repository with a single recorded file.
()
| 45 | |
| 46 | /// Create a test repository with a single recorded file. |
| 47 | fn create_test_repo() -> (Repository, TempDir, PathBuf) { |
| 48 | let temp = TempDir::new().expect("Failed to create temp dir"); |
| 49 | let repo_path = temp.path().to_path_buf(); |
| 50 | |
| 51 | let repo = Repository::init(&repo_path).expect("Failed to init repository"); |
| 52 | |
| 53 | (repo, temp, repo_path) |
| 54 | } |
| 55 | |
| 56 | /// Helper to create a file in the repository and add it. |
| 57 | fn create_and_add_file(repo: &Repository, repo_path: &Path, name: &str, content: &str) { |
no test coverage detected