yog 0.0.1

yog: a balls-oriented session manager for lernie loops (egui frontend)
Documentation
//! The fixtures' one `git` fork site. Split out of `fixture` so both the
//! helper and the workspace-builder stay under the 300-line source cap.
//!
//! Every fork here routes through `crate::test_support::spawn_locked`, the binary-wide
//! spawn discipline: a fork must not land while another test holds a
//! not-yet-closed write fd to a recorder script it is about to exec
//! (ETXTBSY — see `crate::test_support`).

use std::path::Path;
use std::process::Command;

/// Env vars to scrub on every `git` spawn (mirrors `cmd.rs`).
const INHERITED_GIT_ENV: &[&str] = &[
    "GIT_DIR",
    "GIT_WORK_TREE",
    "GIT_INDEX_FILE",
    "GIT_OBJECT_DIRECTORY",
    "GIT_PREFIX",
    "GIT_COMMON_DIR",
    "GIT_ALTERNATE_OBJECT_DIRECTORIES",
];

pub(super) fn run_git(repo: &Path, args: &[&str]) {
    let mut cmd = Command::new("git");
    for var in INHERITED_GIT_ENV {
        cmd.env_remove(var);
    }
    cmd.arg("-C")
        .arg(repo)
        .args(args)
        .env("GIT_AUTHOR_DATE", "2026-04-22T12:00:00Z")
        .env("GIT_COMMITTER_DATE", "2026-04-22T12:00:00Z");
    // Fork under SPAWN_LOCK; wait outside it so git still runs concurrently.
    let status = crate::test_support::spawn_locked(&mut cmd)
        .unwrap()
        .wait()
        .unwrap();
    assert!(status.success(), "git {args:?} failed");
}