Documentation
¶
Overview ¶
Package squash implements the squash command, which squashes a branch's commits into one and restacks its upstack branches.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
Engine Engine
actions.MutationDeps
Log output.Logger
// Verify runs git commit hooks when set (the inverse of --no-verify).
Verify bool
}
Deps are the collaborators squash needs. Adapters build them from their own runtime state; the action never sees bootstrap types.
type Engine ¶
type Engine interface {
actions.OwnershipEngine
CurrentBranch(ctx context.Context) *engine.Branch
CheckoutBranch(ctx context.Context, branch engine.Branch) error
SquashCurrentBranch(ctx context.Context, opts engine.SquashOptions) error
Graph(ctx context.Context, strategy engine.SortStrategy) *engine.StackGraph
}
Engine lists exactly the engine methods squash calls.
type Options ¶
type Options struct {
// Branch is the branch to squash. Empty means the current branch. When it
// names another branch, the action checks it out for the squash and
// restores the original branch afterwards, on success or failure.
Branch string
Message string
NoEdit bool
}
Options contains options for the squash command
Click to show internal directories.
Click to hide internal directories.