Documentation
¶
Overview ¶
Package main is the entry point for the safegit CLI, a concurrency-safe git wrapper that isolates commits via per-invocation temporary indexes.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
commit
Amend and Reword implement tip-commit rewriting with CAS safety.
|
Amend and Reword implement tip-commit rewriting with CAS safety. |
|
coord
Package coord implements the coordination layer that prevents concurrent agents from corrupting the working tree by guarding tree-mutating operations.
|
Package coord implements the coordination layer that prevents concurrent agents from corrupting the working tree by guarding tree-mutating operations. |
|
git
Package git wraps os/exec calls to the git binary and is the sole interface through which safegit interacts with git plumbing commands.
|
Package git wraps os/exec calls to the git binary and is the sole interface through which safegit interacts with git plumbing commands. |
|
hooks
Package hooks discovers and executes pre-pre-push hooks that run before any network I/O, solving the SSH timeout problem when checks are long-running.
|
Package hooks discovers and executes pre-pre-push hooks that run before any network I/O, solving the SSH timeout problem when checks are long-running. |
|
index
Package index manages per-invocation temporary git indexes so each safegit invocation stages into its own index seeded from HEAD, avoiding contention.
|
Package index manages per-invocation temporary git indexes so each safegit invocation stages into its own index seeded from HEAD, avoiding contention. |
|
lock
Package lock provides ref-lock primitives for concurrent ref updates using O_CREAT|O_EXCL for atomic lock file creation and exponential backoff polling.
|
Package lock provides ref-lock primitives for concurrent ref updates using O_CREAT|O_EXCL for atomic lock file creation and exponential backoff polling. |
|
oplog
Package oplog implements the append-only JSONL operation log that records every mutating operation for undo support and audit trail purposes.
|
Package oplog implements the append-only JSONL operation log that records every mutating operation for undo support and audit trail purposes. |
|
repo
Package repo manages the .git/safegit/ data directory including initialization, configuration loading, validation, and path helpers for all state files.
|
Package repo manages the .git/safegit/ data directory including initialization, configuration loading, validation, and path helpers for all state files. |
|
scan
Package scan iterates all git objects (reachable and unreachable) and matches patterns against their textual content for history scrubbing.
|
Package scan iterates all git objects (reachable and unreachable) and matches patterns against their textual content for history scrubbing. |
|
stage
Package stage implements hunk-level staging against temporary indexes by parsing unified diffs and applying selective patches for partial-file commits.
|
Package stage implements hunk-level staging against temporary indexes by parsing unified diffs and applying selective patches for partial-file commits. |
|
submodule
Package submodule discovers and inspects git submodules.
|
Package submodule discovers and inspects git submodules. |
|
testutil
Package testutil provides shared test helpers for creating temporary git repos, used across internal/*_test.go packages to avoid duplicating boilerplate.
|
Package testutil provides shared test helpers for creating temporary git repos, used across internal/*_test.go packages to avoid duplicating boilerplate. |
|
trailer
Package trailer injects git trailers (key-value metadata lines) into commit messages for AI agent traceability and session attribution.
|
Package trailer injects git trailers (key-value metadata lines) into commit messages for AI agent traceability and session attribution. |
Click to show internal directories.
Click to hide internal directories.