Updated
On this page
Package coord implements the coordination layer that prevents concurrent agents from corrupting the working tree by guarding tree-mutating operations.
#internal/coord
#internal/coord
Package coord implements the coordination layer that prevents concurrent agents from corrupting the working tree by guarding tree-mutating operations. It checks whether the working tree is clean before allowing checkout, merge, rebase, reset, and pull to proceed.
#DirtyState
go
type DirtyState structDirtyState describes why the working tree is not clean.
#Check
go
func Check(ctx context.Context, safegitDir string) (*DirtyState, error)Check inspects the working tree. Returns nil if clean.
#DirtyState.Refuse
go
func (d *DirtyState) Refuse(operation string) stringRefuse formats a refusal message from a DirtyState.