| 639 | use git2::Signature; |
| 640 | |
| 641 | fn fixture_repo() -> (tempfile::TempDir, GitRepository) { |
| 642 | let dir = tempfile::TempDir::new().unwrap(); |
| 643 | let git = GitRepository::init(dir.path()).unwrap(); |
| 644 | { |
| 645 | let mut config = git.config().unwrap(); |
| 646 | config.set_str("user.name", "CB-10A Tests").unwrap(); |
| 647 | config.set_str("user.email", "cb10a@example.com").unwrap(); |
| 648 | } |
| 649 | (dir, git) |
| 650 | } |
| 651 | |
| 652 | fn commit_on(git: &GitRepository, message: &str, parents: &[git2::Oid]) -> git2::Oid { |
| 653 | let tree_id = if parents.is_empty() { |