git

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffResult

type DiffResult struct {
	Diff string `json:"diff"`
}

type ExecResult

type ExecResult struct {
	ExitCode int    `json:"exitCode"`
	Stdout   string `json:"stdout"`
	Stderr   string `json:"stderr"`
}

type LogEntry

type LogEntry struct {
	Hash    string `json:"hash"`
	Message string `json:"message"`
	Author  string `json:"author"`
	Date    string `json:"date"`
}

type LogResult

type LogResult struct {
	Commits []LogEntry `json:"commits"`
	HasMore bool       `json:"hasMore"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(logger *slog.Logger) *Manager

func (*Manager) Diff

func (m *Manager) Diff(workDir, ref string) (*DiffResult, error)

func (*Manager) Exec

func (m *Manager) Exec(workDir string, args []string) (*ExecResult, error)

func (*Manager) Log

func (m *Manager) Log(workDir string, limit, skip int) (*LogResult, error)

func (*Manager) Status

func (m *Manager) Status(workDir string) (*StatusResult, error)

type StatusResult

type StatusResult struct {
	Branch    string   `json:"branch"`
	Ahead     int      `json:"ahead"`
	Behind    int      `json:"behind"`
	Staged    []string `json:"staged"`
	Modified  []string `json:"modified"`
	Untracked []string `json:"untracked"`
}

Jump to

Keyboard shortcuts

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