Documentation
¶
Overview ¶
Package delete implements support for branch deletion with git-spice.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitRepository ¶
type GitRepository interface {
PeelToCommit(ctx context.Context, ref string) (git.Hash, error)
LocalBranches(ctx context.Context, opts *git.LocalBranchesOptions) iter.Seq2[git.LocalBranch, error]
IsAncestor(ctx context.Context, a, b git.Hash) bool
DeleteBranch(ctx context.Context, branch string, opts git.BranchDeleteOptions) error
BranchExists(ctx context.Context, branch string) bool
}
GitRepository provides access to tree-less operations on a Git repository.
type GitWorktree ¶
type GitWorktree interface {
CurrentBranch(ctx context.Context) (string, error)
Checkout(ctx context.Context, branch string) error
DetachHead(ctx context.Context, commit string) error
}
GitWorktree is a checkout of a Git repository.
type Handler ¶
type Handler struct {
Log *silog.Logger // required
View ui.View // required
Repository GitRepository // required
Worktree GitWorktree // required
Store Store // required
Service Service // required
}
Handler implements support for branch deletion with git-spice.
type Service ¶
type Service interface {
LookupBranch(ctx context.Context, name string) (*spice.LookupBranchResponse, error)
ListAbove(ctx context.Context, branch string) ([]string, error)
BranchOnto(ctx context.Context, req *spice.BranchOntoRequest) error
RebaseRescue(ctx context.Context, req spice.RebaseRescueRequest) error
}
Service provides access to spice.Service methods
Click to show internal directories.
Click to hide internal directories.