()
| 41 | } |
| 42 | |
| 43 | fn fixture() -> (TempDir, Vec<Hash>) { |
| 44 | let dir = TempDir::new().unwrap(); |
| 45 | let repo = Repository::init(dir.path()).unwrap(); |
| 46 | let mut hashes = Vec::new(); |
| 47 | for name in ["a.txt", "b.txt", "c.txt"] { |
| 48 | fs::write(dir.path().join(name), name).unwrap(); |
| 49 | repo.add( |
| 50 | repo.require_working_copy_id().unwrap(), |
| 51 | name, |
| 52 | Default::default(), |
| 53 | ) |
| 54 | .unwrap(); |
| 55 | hashes.push(record(&repo, name)); |
| 56 | } |
| 57 | (dir, hashes) |
| 58 | } |
| 59 | |
| 60 | fn history(repo: &Repository) -> Vec<Hash> { |
| 61 | repo.log(HistoryOptions::default().include_inherited(true)) |
no test coverage detected