| 1313 | } |
| 1314 | |
| 1315 | fn raw_commit(git: &GitRepository, files: &RawFiles, parent: Option<Oid>) -> Oid { |
| 1316 | let tree = git.find_tree(raw_tree(git, files, b"")).unwrap(); |
| 1317 | let signature = git2::Signature::new( |
| 1318 | "Stream paths", |
| 1319 | "paths@example.invalid", |
| 1320 | &git2::Time::new(1_700_000_000, 0), |
| 1321 | ) |
| 1322 | .unwrap(); |
| 1323 | let parent = parent.map(|oid| git.find_commit(oid).unwrap()); |
| 1324 | git.commit( |
| 1325 | Some("refs/heads/main"), |
| 1326 | &signature, |
| 1327 | &signature, |
| 1328 | "raw tree names and kinds", |
| 1329 | &tree, |
| 1330 | &parent.iter().collect::<Vec<_>>(), |
| 1331 | ) |
| 1332 | .unwrap() |
| 1333 | } |
| 1334 | |
| 1335 | fn assert_raw_history(git: &GitRepository, tips: &[Oid]) { |
| 1336 | let policy = conversion_policy(git).unwrap(); |