git

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChangedFiles added in v0.1.5

func GetChangedFiles() ([]string, error)

GetChangedFiles returns a list of all changed files (staged and unstaged)

Types

type Diff

type Diff struct {
	FilePath string
	Content  string
}

Diff represents a git diff for a specific file

func GetDiff

func GetDiff(files ...string) ([]Diff, error)

GetDiff returns the git diff for the specified files or all changes if no files specified

func GetStagedDiff added in v0.2.0

func GetStagedDiff(files ...string) ([]Diff, error)

GetStagedDiff returns only the staged diff for specified files

type StagedState added in v0.2.0

type StagedState struct {
	StagedFiles []string
	Hash        string // Hash of the staged state for change detection
}

StagedState represents the current state of staged changes

func GetStagedState added in v0.2.0

func GetStagedState() (*StagedState, error)

GetStagedState returns the current staged state with hash for change detection

Jump to

Keyboard shortcuts

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