Documentation
¶
Overview ¶
Package gitlog implements the git log panel for grut. It provides a scrollable commit history with ASCII graph rendering, paginated loading, search filtering, and commit detail view.
Package gitlog implements the git log panel with commit graph rendering.
Index ¶
- type GraphEntry
- type GraphRenderer
- type Panel
- func (p *Panel) Blur()
- func (p *Panel) Focus()
- func (p *Panel) Init(ctx context.Context) tea.Cmd
- func (p *Panel) KeyBindings() []panels.KeyBinding
- func (p *Panel) SetActionsCfg(cfg config.ActionsConfig)
- func (p *Panel) SetSize(width, height int)
- func (p *Panel) Title() string
- func (p *Panel) Update(msg tea.Msg) (panels.Panel, tea.Cmd)
- func (p *Panel) View(width, height int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GraphEntry ¶
type GraphEntry struct {
Prefix string // graph prefix for the commit line, e.g. "* " or "| * "
Connectors []string // connector lines drawn after this commit, e.g. ["|\\", "|/"]
}
GraphEntry holds the rendered graph prefix for one commit.
type GraphRenderer ¶
type GraphRenderer struct {
// contains filtered or unexported fields
}
GraphRenderer produces ASCII commit graph prefixes by tracking active lanes. Commits must be fed in topological order (newest first).
func NewGraphRenderer ¶
func NewGraphRenderer() *GraphRenderer
NewGraphRenderer creates a new renderer with empty lane state.
func (*GraphRenderer) RenderCommit ¶
func (g *GraphRenderer) RenderCommit(c git.Commit) GraphEntry
RenderCommit processes one commit and returns its graph entry.
type Panel ¶
type Panel struct {
// contains filtered or unexported fields
}
Panel is the git log panel. It implements panels.Panel.
func New ¶
func New(client git.StatusReader, cfg config.GitConfig) *Panel
New creates a new git log 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 stores the actions configuration for right-click support.