ls_tree

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LsTreeEntry

type LsTreeEntry struct {
	FullFilepath string
	object.TreeEntry
}

type Result

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

func LsTree

func LsTree(ctx context.Context, repository *git.Repository, commit string, pathMatcher path_matcher.PathMatcher, allFiles bool) (*Result, error)

LsTree returns the Result with tree entries that satisfy the passed pathMatcher. The function works lazily and does not go through a tree directory unnecessarily. If the result should contain only regular files (without directories and submodules), you should use the allFiles parameter.

func NewResult added in v1.2.6

func NewResult(commit string, repositoryFullFilepath string, lsTreeEntries []*LsTreeEntry, submodulesResults []*SubmoduleResult) *Result

func (*Result) Checksum

func (r *Result) Checksum(ctx context.Context) string

func (*Result) IsEmpty

func (r *Result) IsEmpty() bool

func (*Result) LsTree

func (r *Result) LsTree(ctx context.Context, repository *git.Repository, pathMatcher path_matcher.PathMatcher, allFiles bool) (*Result, error)

func (*Result) LsTreeEntry added in v1.2.5

func (r *Result) LsTreeEntry(relPath string) *LsTreeEntry

func (*Result) LsTreeEntryContent added in v1.2.5

func (r *Result) LsTreeEntryContent(mainRepository *git.Repository, relPath string) ([]byte, error)

func (*Result) Walk

func (r *Result) Walk(f func(lsTreeEntry *LsTreeEntry) error) error

type SubmoduleResult

type SubmoduleResult struct {
	*Result
	// contains filtered or unexported fields
}

func NewSubmoduleResult added in v1.2.6

func NewSubmoduleResult(submodulePath, submoduleName string, result *Result) *SubmoduleResult

Jump to

Keyboard shortcuts

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