Documentation
¶
Overview ¶
Package gc decides which stacks can go: a pure function from what Docker and git know about each stack to the actions siding gc takes. It never removes git worktrees or branches, and never anything that could hold unmerged or uncommitted work.
Index ¶
Constants ¶
View Source
const ( Merged = "Merged" WorktreeGone = "WorktreeGone" )
Reasons a stack goes. Part of the --json contract.
View Source
const ( Dirty = "Dirty" Unmerged = "Unmerged" DefaultBranch = "DefaultBranch" )
Reasons a stack stays. Part of the --json contract.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct {
Project string
Reason string
// Volumes: also remove the volumes, and with them the data.
Volumes bool
}
Action removes a stack.
type Facts ¶
type Facts struct {
Project string
Branch string
Worktree string
// Machine is the stack's dev.siding.machine; gc only acts on this machine's stacks.
Machine string
// WorktreeExists is false when the worktree directory is gone.
WorktreeExists bool
// Dirty: the worktree has changes. Only meaningful while it exists.
Dirty bool
// Merge is the branch's merge state; MergeKnown is false when git could not be asked (no
// dev.siding.gitdir label, or the git directory is gone too).
Merge git.MergeState
MergeKnown bool
}
Facts are what siding found out about one stack.
Click to show internal directories.
Click to hide internal directories.