git

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitCmd

func CommitCmd(message string) *exec.Cmd

CommitCmd returns the exec.Cmd for the git commit command with the given message. It uses the -e flag to open the editor. If message is empty, it runs 'git commit' without -m, opening the editor for a manual commit.

func GetRecentHistory

func GetRecentHistory(n int) (string, error)

GetRecentHistory returns the last n commit messages with their bodies.

func GetStagedDiff

func GetStagedDiff() (string, error)

GetStagedDiff returns the diff of staged changes.

func GetStagedDiffSize

func GetStagedDiffSize() (int, error)

GetStagedDiffSize returns the approximate number of characters in the staged diff. This is used to warn the user if the diff is too large for the AI context.

func IsRepo

func IsRepo() bool

IsRepo checks if the current directory is a git repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

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