Skip to content

Commit 91654af

Browse files
committed
Configure user.{name,email} for the bare repo as well
1 parent f775b5c commit 91654af

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tests/git.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ pub fn init() {
1616
let _ = fs::rmdir_recursive(&checkout());
1717
let _ = fs::rmdir_recursive(&bare());
1818
// Prepare a bare remote repo
19-
git2::Repository::init_bare(&bare()).unwrap();
19+
{
20+
let bare = git2::Repository::init_bare(&bare()).unwrap();
21+
let mut config = bare.config().unwrap();
22+
config.set_str("user.name", "name").unwrap();
23+
config.set_str("user.email", "email").unwrap();
24+
}
2025

2126
// Initialize a fresh checkout
2227
let checkout = git2::Repository::init(&checkout()).unwrap();

0 commit comments

Comments
 (0)