This commit is contained in:
Kiril Videlov 2024-04-27 23:43:25 +02:00
parent d65f723ec0
commit 6ff0d551eb
No known key found for this signature in database

View File

@ -129,11 +129,14 @@ mod tests {
let mut index = repo.index().unwrap();
index.add_path(&PathBuf::from("foo.txt")).unwrap();
let oid = index.write_tree().unwrap();
let name = "Your Name";
let email = "your.email@example.com";
let signature = git2::Signature::now(name, email).unwrap();
let commit_id = repo
.commit(
Some("HEAD"),
&repo.signature().unwrap(),
&repo.signature().unwrap(),
&signature,
&signature,
"initial commit",
&repo.find_tree(oid).unwrap(),
&[],