git

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUncommittedChanges

func CheckUncommittedChanges() (status string, hasChanges bool, err error)

CheckUncommittedChanges checks for uncommitted changes status: git status --porcelain output hasChanges: whether there are changes

func DisplayGitConfirmHeader

func DisplayGitConfirmHeader(title, subtitle, target string)

DisplayGitConfirmHeader displays the confirm UI header

func DisplayUncommittedChangesWarning

func DisplayUncommittedChangesWarning(status string)

DisplayUncommittedChangesWarning displays a warning for uncommitted changes

func ExecuteGitCheckout

func ExecuteGitCheckout(target string) (string, string, error)

ExecuteGitCheckout restores a file or checks out a branch

func ExecuteGitCommand

func ExecuteGitCommand(args ...string) (string, error)

ExecuteGitCommand executes a git command and returns the result

func ExecuteGitCommit

func ExecuteGitCommit(message string) string

ExecuteGitCommit executes git commit

func FormatGitError

func FormatGitError(err error, output string) string

FormatGitError formats a git command error

func FormatGitSuccess

func FormatGitSuccess(action, target string) string

FormatGitSuccess formats a git success message

func RegisterTools

func RegisterTools(registry *tools.Registry)

RegisterTools registers git tools with the registry

func TruncateOutput

func TruncateOutput(output string, maxLines int) string

TruncateOutput truncates output to specified number of lines

Types

type GitCheckoutTool

type GitCheckoutTool struct{}

GitCheckoutTool is the tool for git checkout

func (*GitCheckoutTool) Description added in v0.44.0

func (t *GitCheckoutTool) Description() string

func (*GitCheckoutTool) Name

func (t *GitCheckoutTool) Name() string

Name returns the tool name

func (*GitCheckoutTool) Parameters added in v0.44.0

func (t *GitCheckoutTool) Parameters() map[string]interface{}

func (*GitCheckoutTool) Run

func (t *GitCheckoutTool) Run(args map[string]string) (string, *tools.FileChange, error)

Run executes the git checkout tool

type GitCommitTool

type GitCommitTool struct{}

GitCommitTool is the tool for git commit

func (*GitCommitTool) Description added in v0.44.0

func (t *GitCommitTool) Description() string

func (*GitCommitTool) Name

func (t *GitCommitTool) Name() string

Name returns the tool name

func (*GitCommitTool) Parameters added in v0.44.0

func (t *GitCommitTool) Parameters() map[string]interface{}

func (*GitCommitTool) Run

func (t *GitCommitTool) Run(args map[string]string) (string, *tools.FileChange, error)

Run executes the git commit tool

Jump to

Keyboard shortcuts

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