repo

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	// Root directory of the repository.
	Root string
}

func NewRepo

func NewRepo() (*Repo, error)

func (*Repo) ExecCommand

func (repo *Repo) ExecCommand(name string, arg ...string) (string, error)

Runs a command with the repo root as the current working directory. Returns the command's standard output with whitespace trimmed.

func (*Repo) ExecCommandLines

func (repo *Repo) ExecCommandLines(name string, arg ...string) ([]string, error)

Runs ExecCommand and splits its output on newlines.

func (*Repo) FilesToBeCommitted

func (repo *Repo) FilesToBeCommitted() ([]string, error)

func (*Repo) FindHookExecutables

func (repo *Repo) FindHookExecutables(hook string) ([]string, error)

Jump to

Keyboard shortcuts

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