git

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Directory

func Directory(ctx context.Context, dir string) (string, error)

Types

type DiffMode

type DiffMode string
const (
	DiffChanged  DiffMode = "HEAD"
	DiffStaged   DiffMode = "--cached"
	DiffUnstaged DiffMode = ""
)

type Repository

type Repository string

func New

func New(ctx context.Context, path string) (*Repository, error)

func (*Repository) Command

func (r *Repository) Command(
	ctx context.Context,
	args ...string,
) (output []byte, err error)

func (*Repository) DiffFiles added in v0.2.0

func (r *Repository) DiffFiles(
	ctx context.Context,
	mode DiffMode,
	paths ...string,
) (files []string, err error)

func (*Repository) Files

func (r *Repository) Files(
	ctx context.Context,
	untracked bool,
	paths ...string,
) (files []string, err error)

func (*Repository) Ignored added in v0.2.0

func (r *Repository) Ignored(ctx context.Context, path string) bool

func (*Repository) String

func (r *Repository) String() string

Jump to

Keyboard shortcuts

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