gitx

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit(repoRoot, message string) error

Commit performs a git commit with the given message.

func DiffHEAD

func DiffHEAD(repoRoot, path string) (string, error)

DiffHEAD returns a unified diff between HEAD and the working tree for a single file.

func LastCommitSummary

func LastCommitSummary(repoRoot string) (string, error)

LastCommitSummary returns short hash and subject of last commit.

func RepoRoot

func RepoRoot(path string) (string, error)

RepoRoot resolves the git repository root from a given path (or current dir).

func StageFiles

func StageFiles(repoRoot string, paths []string) error

StageFiles stages the provided file paths.

Types

type FileChange

type FileChange struct {
	Path      string
	Staged    bool
	Unstaged  bool
	Untracked bool
	Binary    bool
}

FileChange represents a changed file in the repo.

func ChangedFiles

func ChangedFiles(repoRoot string) ([]FileChange, error)

ChangedFiles lists files changed relative to HEAD, combining staged, unstaged, and untracked.

Jump to

Keyboard shortcuts

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