ls_tree

package
v1.2.164 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 LsTreeOptions added in v1.2.11

type LsTreeOptions struct {
	// the PathScope option determines the directory or file that will get into the result (similar to <pathspec> in the git commands)
	PathScope   string
	PathMatcher path_matcher.PathMatcher
	AllFiles    bool
}

func (LsTreeOptions) ID added in v1.2.11

func (opts LsTreeOptions) ID() string

type Result

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

func LsTree

func LsTree(ctx context.Context, repoHandle repo_handle.Handle, commit string, opts LsTreeOptions) (*Result, error)

LsTree returns the Result with tree entries that satisfy the passed options. 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 option.

func NewResult added in v1.2.6

func NewResult(commit, 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, repoHandle repo_handle.Handle, opts LsTreeOptions) (*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(mainRepoHandle repo_handle.Handle, 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(submoduleName, submodulePath string, result *Result) *SubmoduleResult

Jump to

Keyboard shortcuts

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