Documentation
¶
Overview ¶
Package abort implements the stackit abort command for canceling in-progress operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContinuationOwnsAbort ¶ added in v0.28.0
func ContinuationOwnsAbort(ctx *app.Context, continuation *config.ContinuationState) bool
ContinuationOwnsAbort reports whether abort should unwind this continuation, rather than treat it as stale or leave abort to another interrupted operation such as a failed absorb.
A live rebase or merge always belongs to it. Once Git's operation is gone, the continuation still belongs to abort if an earlier abort began the rollback, or if the rebased branch still sits at its pre-rebase tip: the user unwound Git by hand (`git rebase --abort`) and the rollback is still owed. A branch that has moved on means the conflict was finished outside stackit (`git rebase --continue`); its snapshot predates whatever the user has done since, and restoring it would roll that work back.
Types ¶
type Handler ¶
type Handler interface {
// PromptConfirmAbort prompts user to confirm aborting the current operation
// Returns true to proceed with abort, false to cancel
PromptConfirmAbort() (bool, error)
// Cleanup restores terminal state (may be no-op)
Cleanup()
// IsInteractive returns true if the handler supports interactive prompts
IsInteractive() bool
}
Handler receives events from abort action
type NullHandler ¶
NullHandler is a no-op handler for when nil is passed
func (*NullHandler) PromptConfirmAbort ¶
func (h *NullHandler) PromptConfirmAbort() (bool, error)
PromptConfirmAbort implements Handler. Returns false (cancel) for null handler.