repo_handle

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

type Handle interface {
	Repository() *git.Repository
	Submodule(submodulePath string) (SubmoduleHandle, error)
	Submodules() []SubmoduleHandle
	ReadBlobObjectContent(hash plumbing.Hash) ([]byte, error)
	GetCommitTree(hash plumbing.Hash) (TreeHandle, error)
}

Handle is a solution to get away from the worktree when working with the git repository, caching the necessary data from the worktree during initialization, and then working exclusively with git objects.

func NewHandle

func NewHandle(repository *git.Repository) (Handle, error)

type SubmoduleHandle

type SubmoduleHandle interface {
	Handle
	Config() *config.Submodule
	Status() *git.SubmoduleStatus
}

type TreeHandle added in v1.2.22

type TreeHandle interface {
	Hash() plumbing.Hash
	Entries() []object.TreeEntry
	Tree(path string) (TreeHandle, error)
	FindEntry(path string) (*object.TreeEntry, error)
}

Jump to

Keyboard shortcuts

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