Documentation
¶
Overview ¶
Package fold provides functionality for folding stacked branches.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler interface {
// Start is called at the beginning of fold
Start(currentBranch, parentBranch string, dryRun bool)
// OnStep is called for each step in the fold process
OnStep(step Step, status handler.StepStatus, message string)
// Complete is called when fold finishes
Complete(result Result)
// Cleanup restores terminal state (may be no-op)
Cleanup()
// IsInteractive returns true if the handler supports interactive prompts
IsInteractive() bool
}
Handler receives events from fold action
type NullHandler ¶
type NullHandler struct {
handler.NullBase
handler.NullProgress[Step]
}
NullHandler is a no-op handler for when nil is passed. It embeds handler.NullBase for Cleanup() and IsInteractive().
type Options ¶
type Options struct {
Keep bool // If true, keeps the name of the current branch instead of using the name of its parent
AllowTrunk bool // If true, allows folding into the trunk branch
DryRun bool // If true, only shows what would happen
}
Options contains options for the fold command
Click to show internal directories.
Click to hide internal directories.