commit

package
v14.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InvalidUTF8PathPlaceholder is a placeholder we return in the Path field since
	// returning non utf8 data will result in a marshalling error
	// Once we deprecate the Path field, we can remove this
	InvalidUTF8PathPlaceholder = "ENCODING ERROR gitaly#1547"
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(
	cfg config.Cfg,
	locator storage.Locator,
	gitCmdFactory git.CommandFactory,
	ling *linguist.Instance,
	catfileCache catfile.Cache,
) gitalypb.CommitServiceServer

NewServer creates a new instance of a grpc CommitServiceServer

Types

type GetCommits

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

GetCommits wraps a git log command that can be interated on to get individual commit objects

func NewGetCommits

func NewGetCommits(cmd *command.Command, batch catfile.Batch) *GetCommits

NewGetCommits returns a new GetCommits object

func (*GetCommits) Commit

func (g *GetCommits) Commit(ctx context.Context, trailers bool) (*gitalypb.GitCommit, error)

Commit returns the current commit

func (*GetCommits) Err

func (g *GetCommits) Err() error

Err returns the first non EOF error

func (*GetCommits) Offset

func (g *GetCommits) Offset(offset int) error

Offset skips over a number of commits

func (*GetCommits) Scan

func (g *GetCommits) Scan() bool

Scan indicates whether or not there are more commits to return

type TreeEntryFinder

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

TreeEntryFinder is a struct for searching through a tree with caching.

func NewTreeEntryFinder

func NewTreeEntryFinder(c catfile.Batch) *TreeEntryFinder

NewTreeEntryFinder initializes a TreeEntryFinder with an empty tree cache.

func (*TreeEntryFinder) FindByRevisionAndPath

func (tef *TreeEntryFinder) FindByRevisionAndPath(ctx context.Context, revision, path string) (*gitalypb.TreeEntry, error)

FindByRevisionAndPath returns a TreeEntry struct for the object present at the revision/path pair.

Jump to

Keyboard shortcuts

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