Documentation
¶
Index ¶
- Constants
- Variables
- type ConflictPathStatus
- type DiffNumStat
- type MovedPathStatus
- type ParseError
- type PathDiffNumStat
- type PathState
- type RegularPathStatus
- type Repo
- func (r Repo) Branches(ctx context.Context) ([]string, error)
- func (r Repo) Checkout(ctx context.Context, what string) error
- func (r Repo) CheckoutBranch(ctx context.Context, name string) error
- func (r Repo) DiffNumStatHead(ctx context.Context) (DiffNumStat, error)
- func (r Repo) Fetch(ctx context.Context) error
- func (r Repo) Path() string
- func (r Repo) PullFastForward(ctx context.Context) error
- func (r Repo) Root() string
- func (r Repo) Status(ctx context.Context) (Status, error)
- func (r Repo) Switch(ctx context.Context, branch string) error
- func (r Repo) SwitchCreate(ctx context.Context, branch string) error
- type Status
- type TokenParseError
- type UnknownRunError
- type UntrackedPathStatus
Constants ¶
View Source
const (
InitialCommitHash = "(initial)"
)
Variables ¶
View Source
var ( ErrDoesNotExist = errors.New("path does not exist") ErrNotDirectory = errors.New("not a directory") ErrNotRepository = errors.New("not a git repository") ErrDotGitOpen = errors.New("attempt to open .git/ as a repository") ErrRepositoryHasNoCommits = errors.New("repository has no commits") ErrUnknownPathspec = errors.New("no such branch") ErrLocalChangesOverwritten = errors.New("commit or stash changes first") ErrUntrackedOverwritten = errors.New("untracked files in the way") ErrBranchAlreadyExists = errors.New("branch already exists") ErrNoRemote = errors.New("no remote configured") ErrNoUpstream = errors.New("branch tracks no remote") ErrNotFastForward = errors.New("diverged, can't fast-forward") ErrMergeRefNotFetched = errors.New("upstream missing, fetch first") )
Functions ¶
This section is empty.
Types ¶
type ConflictPathStatus ¶
type DiffNumStat ¶
type DiffNumStat struct {
Paths []PathDiffNumStat
}
type MovedPathStatus ¶
type ParseError ¶
type ParseError struct {
Errs []error
}
func (*ParseError) Error ¶
func (e *ParseError) Error() string
type PathDiffNumStat ¶
type RegularPathStatus ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (Repo) Branches ¶ added in v0.1.0
Branches lists the repo's local branch names. A repo with no commits has no branches and yields an empty slice.
func (Repo) CheckoutBranch ¶ added in v0.1.0
func (Repo) DiffNumStatHead ¶
func (r Repo) DiffNumStatHead(ctx context.Context) (DiffNumStat, error)
func (Repo) PullFastForward ¶ added in v0.1.0
type TokenParseError ¶
func (TokenParseError) Error ¶
func (e TokenParseError) Error() string
type UnknownRunError ¶
func NewUnknownRunErr ¶
func NewUnknownRunErr(res exec.Result, err error) *UnknownRunError
func (*UnknownRunError) Error ¶
func (e *UnknownRunError) Error() string
type UntrackedPathStatus ¶
type UntrackedPathStatus struct {
Path string
}
Click to show internal directories.
Click to hide internal directories.