dsh-checkout-guard: Verify which working copy you are operating on before writing
A DSH plugin that reads a Git working copy and answers questions before editing, committing, or pushing: branch identity, divergence or lag with the remote, data staleness, the signature email for the next commit, staging area status, and whether another clone of the same repository is running ahead on the local machine. It provides two tools, checkout_guard (single-copy deep check) and checkout_guard_scan (root directory batch scan), which output safeToWrite, blockers, and warnings. It is read-only, does not connect to the network by default, and never occupies the index lock. It ensures security through GIT_OPTIONAL_LOCKS=0, GIT_TERMINAL_PROMPT=0, URL credential stripping, and realpath path whitelist. It runs with the permissions of the current DSH process; the source code and license should be checked before installation.
Read Moredsh-checkout-guard: Status Precheck Before Writing to the Git Working Directory
`dsh-checkout-guard` is a DSH plugin that checks the Git working tree state before making edits, commits, or pushes, preventing data loss caused by branch mismatches or an incorrect working tree state. It is read-only by default and primarily checks branch identity, divergence from the remote, uncommitted changes, duplicate clones, and commit author identity. After installation, individual checks can be performed with `checkout_guard`, while batch scans can be run with `checkout_guard_scan`; if the state is found to be abnormal, write operations are blocked. It does not automatically fix issues or pull code, but only provides state warnings to ensure that an agent stops operating when the repository state is unclear.
Read More