diff --git a/src/git/migration.rs b/src/git/migration.rs index 0b7126f..79bf168 100644 --- a/src/git/migration.rs +++ b/src/git/migration.rs @@ -2172,7 +2172,13 @@ mod tests { let origin = temp.path().join("origin.git"); git( temp.path(), - &["init", "--bare", "--quiet", origin.to_str().unwrap()], + &[ + "init", + "--bare", + "--quiet", + "--initial-branch=main", + origin.to_str().unwrap(), + ], ); let parent = write_commit_object(&origin, None); let child = write_commit_object(&origin, Some(&parent)); diff --git a/src/git/subprocess.rs b/src/git/subprocess.rs index 1dc9c4e..54f9f9e 100644 --- a/src/git/subprocess.rs +++ b/src/git/subprocess.rs @@ -142,7 +142,7 @@ mod tests { fn create_bare_repo() -> TempDir { let dir = TempDir::new().unwrap(); let status = StdCommand::new("git") - .args(["init", "--bare"]) + .args(["init", "--bare", "--quiet", "--initial-branch=main"]) .arg(dir.path()) .status() .expect("Failed to run git init");