Expand description
Lightweight git status check via shell-out.
apply uses this to decide whether to escalate AutoAbsorb to
NeedsConfirm when [absorb] require_clean_git = true — pulling
target-side edits into a dirty source repo would mix yui’s writes
with the user’s in-progress changes in a single commit.
No git crate dependency: shells out to the git CLI. If git isn’t
installed or the directory isn’t a repo, callers receive a clear
Error::Git and can decide how lenient to be.
Functions§
- is_
clean - Returns
truewhen the working tree atrepohas no uncommitted changes and no untracked files (i.e.git status --porcelainis empty).Err(Error::Git(_))ifgitisn’t on$PATHorrepoisn’t a repository.