gitlog

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 13 Imported by: 0

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

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) Blur

func (p *Panel) Blur()

Blur implements panels.Panel.

func (*Panel) Focus

func (p *Panel) Focus()

Focus implements panels.Panel.

func (*Panel) Init

func (p *Panel) Init(ctx context.Context) tea.Cmd

--------------------------------------------------------------------------- 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.

func (*Panel) SetSize

func (p *Panel) SetSize(width, height int)

SetSize implements panels.Panel.

func (*Panel) Title

func (p *Panel) Title() string

Title implements panels.Panel.

func (*Panel) Update

func (p *Panel) Update(msg tea.Msg) (panels.Panel, tea.Cmd)

Update implements panels.Panel.

func (*Panel) View

func (p *Panel) View(width, height int) string

View implements panels.Panel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL