This commit introduces the complete core logic for Gosh (Git Operations Shell), providing a fail-safe mechanism for managing multiple Git identities. Key features implemented: - **Ephemeral Execution (Exec Mode)**: Uses `git -c` with blind injection to sanitize the environment (clearing user/gpg keys) before injecting the target profile. Zero disk modification. - **Persistent Switching (Switch Mode)**: Modifies `.git/config` using `[include]` directive. Supports `-f` force mode to strictly sanitize legacy dirty configurations (removing user/gpg sections). - **Setup Automation**: Handles `clone` and `init` by automatically inferring directory names and applying the profile immediately. - **Profile Management**: CRUD operations (-c, -r, -e, -l) for profiles. - **Config**: XDG-compliant configuration with auto-initialization at `~/.config/gosh/`. - **Testing**: Comprehensive integration suite covering isolation, injection, persistence, and sanitization logic. Implements strict security boundaries defined in the PRD (Blacklist/Whitelist).
16 lines
293 B
TOML
16 lines
293 B
TOML
[package]
|
|
name = "gosh"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
clap = { version = "4.5", features = ["derive"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
toml = "0.8"
|
|
dirs = "5.0"
|
|
anyhow = "1.0"
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = "2.0"
|
|
tempfile = "3.10"
|
|
predicates = "3.1"
|