Documentation
¶
Overview ¶
Package branches implements the branch management panel for grut. It displays local and remote branches with tracking information and supports checkout, create, delete, rename, and fetch operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitOps ¶
type GitOps interface {
BranchList(ctx context.Context) ([]git.Branch, error)
BranchCreate(ctx context.Context, name string, base string) error
BranchDelete(ctx context.Context, name string, force bool) error
BranchRename(ctx context.Context, oldName, newName string) error
Checkout(ctx context.Context, ref string) error
WorktreeAdd(ctx context.Context, path, branch string) error
Fetch(ctx context.Context, opts git.FetchOpts) error
RemoteList(ctx context.Context) ([]git.Remote, error)
}
GitOps defines the git operations required by the branch panel. This narrow interface is satisfied by *git.Client and makes the panel easy to mock in tests.
type Panel ¶
--------------------------------------------------------------------------- Panel --------------------------------------------------------------------------- Panel is the branch management panel. It implements panels.Panel.
func (*Panel) Init ¶
--------------------------------------------------------------------------- panels.Panel interface --------------------------------------------------------------------------- Init implements panels.Panel.
func (*Panel) KeyBindings ¶
func (p *Panel) KeyBindings() []panels.KeyBinding
KeyBindings implements panels.Panel.
func (*Panel) SetActionsCfg ¶
func (p *Panel) SetActionsCfg(cfg config.ActionsConfig)
SetActionsCfg injects the actions configuration for right-click menus.