git

package
v0.1.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRoot

func GetRoot(dir string) (string, error)

func IsRoot

func IsRoot(dir string) (bool, error)

Types

type FileStatus

type FileStatus struct {
	Name              string
	IndexStatus       byte
	WorkingTreeStatus byte
	RenameFrom        string // only exists for rename
}

func Status

func Status(dir string, allowSubmodule bool) ([]FileStatus, error)

type G

type G struct {
	Dir string
	Env []string
}

func (*G) IsRoot

func (g *G) IsRoot() (bool, error)

func (*G) Root

func (g *G) Root() (string, error)

func (*G) Run

func (g *G) Run(args ...string) *Result

func (*G) Status

func (g *G) Status(allowSubmodule bool) ([]FileStatus, error)

type Result

type Result struct {
	Output []byte

	ExitCode   int
	ExitErr    *exec.ExitError
	UnknownErr error
}

func R

func R(wd string, args []string) *Result

func Run

func Run(args ...string) *Result

func (*Result) Err

func (r *Result) Err() error

Jump to

Keyboard shortcuts

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