commit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package commit provides ui to perform a git commit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(msg string) tea.Cmd

Execute creates a tea.Cmd to execute a git commit.

Types

type Content

type Content struct {
	Model
}

Content is a wrapper to use the commit ui as dialog.Content.

func NewContent

func NewContent(commit Model) Content

func (Content) Init

func (c Content) Init() tea.Cmd

func (Content) SetSize

func (c Content) SetSize(width, height int) dialog.Content

func (Content) Update

func (c Content) Update(msg tea.Msg) (dialog.Content, tea.Cmd)

func (Content) View

func (c Content) View() string

type ExecutedMsg

type ExecutedMsg struct {
	Err error
}

ExecutedMsg is the message to be sent after we performed a git commit.

type KeyMap

type KeyMap struct {
	// contains filtered or unexported fields
}

func NewKeyMap

func NewKeyMap() KeyMap

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model represents the UI to pefrom a commit. It shows the staged files to be included in the commit and allows to write a commit message.

func New

func New(branch string, stagedFileList git.FileStatusList) Model

func (Model) Help

func (m Model) Help() []key.Binding

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) SetSize

func (m Model) SetSize(width, height int) Model

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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