status

package
v1.2.42 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComplexScope added in v1.2.10

type ComplexScope struct {
	// contains filtered or unexported fields
}

func (ComplexScope) PathList added in v1.2.10

func (s ComplexScope) PathList() []string

func (ComplexScope) Submodules added in v1.2.10

func (s ComplexScope) Submodules() []submodule

type Index added in v1.2.10

type Index struct {
	// contains filtered or unexported fields
}

func (Index) Checksum added in v1.2.10

func (s Index) Checksum() string

func (Index) PathList added in v1.2.10

func (s Index) PathList() []string

func (Index) Submodules added in v1.2.10

func (s Index) Submodules() []submodule

type Result

type Result struct {
	Index             Index
	Worktree          Worktree
	UntrackedPathList []string
}

func Status

func Status(ctx context.Context, workTreeDir string) (r Result, err error)

Status returns Result with path lists of untracked files and modified files for index and worktree. The function counts each file status as Modified if it is not Unmodified or Untracked ([ADU] == M). The function does not work with ignored, renamed and copied files.

func (*Result) IndexWithWorktree

func (r *Result) IndexWithWorktree() Scope

func (*Result) PathListWithSubmodules added in v1.2.24

func (r *Result) PathListWithSubmodules() (result []string)

PathListWithSubmodules returns a list of changed files

type Scope

type Scope interface {
	PathList() []string
	Submodules() []submodule
}

type Worktree added in v1.2.10

type Worktree struct {
	// contains filtered or unexported fields
}

func (Worktree) PathList added in v1.2.10

func (s Worktree) PathList() []string

func (Worktree) Submodules added in v1.2.10

func (s Worktree) Submodules() []submodule

Jump to

Keyboard shortcuts

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