igit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package igit defines logic for interacting with Git on the host.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	// BaselineStatusForCI is used to check against when running CI checks, so that each CI task can
	// see if it introduced changes.
	BaselineStatusForCI Status
	// CurrentStatus is the latest-available Git status, which may differ from the baseline.
	CurrentStatus Status
}

Git defines metadata & behavior for Git interactions.

func New

func New() (*Git, error)

New returns a snapshot of Git information available at call-time.

func (*Git) StatusHasChanged

func (g *Git) StatusHasChanged() (bool, error)

StatusHasChanged informs the caller of whether or not the Status now differs from the baseline.

func (*Git) Update

func (g *Git) Update() error

Update recalculates various Git metadata, respecting any existing baseline values set in New.

type Status

type Status struct {
	Diff           []string
	UntrackedFiles []string
}

Status holds various pieces of information about Git status.

Jump to

Keyboard shortcuts

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