git

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDiff

func GetDiff(path string, staged bool) (string, error)

GetDiff retrieves the git diff for the specified path

func GetDiffForMode

func GetDiffForMode(path string, mode DiffMode) (string, error)

GetDiffForMode retrieves the git diff for a specific diff mode

func IsGitRepository

func IsGitRepository(path string) bool

IsGitRepository checks if the given path is within a git repository

Types

type DiffMode

type DiffMode int
const (
	DiffModeAll DiffMode = iota
	DiffModeStaged
	DiffModeUnstaged
)

Jump to

Keyboard shortcuts

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