safegit v0.26.0 /internal/coord
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 go
type DirtyState struct

DirtyState describes why the working tree is not clean.

#Check

Go go
func Check(ctx context.Context, safegitDir string) (*DirtyState, error)

Check inspects the working tree. Returns nil if clean.

#DirtyState.Refuse

Go go
func (d *DirtyState) Refuse(operation string) string

Refuse formats a refusal message from a DirtyState.

Search