Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
carpe-diem committed Dec 27, 2024
1 parent cd77418 commit a840a71
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,19 +182,20 @@ mod tests {

fn init_git_repo(dir: &Path) -> io::Result<()> {
Command::new("git")
.args(["init"])
.current_dir(dir)
.status()?;

Command::new("git")
.args(["config", "--local", "user.name", "Test User"])
.args(["init", "--initial-branch=main"])
.current_dir(dir)
.status()?;

Command::new("git")
.args(["config", "--local", "user.email", "[email protected]"])
.current_dir(dir)
.status()?;
for &(key, value) in &[
("user.name", "Test User"),
("user.email", "[email protected]"),
("commit.gpgsign", "false"),
] {
Command::new("git")
.args(["config", "--local", key, value])
.current_dir(dir)
.status()?;
}

Ok(())
}
Expand Down

0 comments on commit a840a71

Please sign in to comment.