mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
test(git): silence bare repository fixtures
Two subprocess tests invoked git init through an inherited stdout and stderr without quiet mode. Clean Nix builds therefore printed Git's default-branch advice and repository initialization message twice in the test log. Initialize the fixture explicitly on main and pass --quiet so it is independent of ambient branch configuration and emits no routine setup output. Production subprocess behavior is unchanged. Validation: cargo fmt --all -- --check; cargo test -p ngit-grasp --lib git::subprocess::tests:: -- --nocapture. Assisted-by: Codex (GPT-5)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user