Documentation ¶
Index ¶
- Constants
- func GetCommit(ctx context.Context, repo *gitalypb.Repository, revision string) (*gitalypb.GitCommit, error)
- func GetCommitCatfile(c *catfile.Batch, revision string) (*gitalypb.GitCommit, error)
- func GetCommitMessage(c *catfile.Batch, repo *gitalypb.Repository, revision string) ([]byte, error)
- func GetTagCatfile(c *catfile.Batch, tagID, tagName string) (*gitalypb.Tag, error)
- func GitLogCommand(ctx context.Context, repo *gitalypb.Repository, revisions []string, ...) (*command.Command, error)
- func IsNotFound(err error) bool
- func LastCommitForPath(ctx context.Context, repo *gitalypb.Repository, revision string, path string) (*gitalypb.GitCommit, error)
- type Parser
Constants ¶
const (
// MaxTagReferenceDepth is the maximum depth of tag references we will dereference
MaxTagReferenceDepth = 10
)
Variables ¶
This section is empty.
Functions ¶
func GetCommit ¶
func GetCommit(ctx context.Context, repo *gitalypb.Repository, revision string) (*gitalypb.GitCommit, error)
GetCommit tries to resolve revision to a Git commit. Returns nil if no object is found at revision.
func GetCommitCatfile ¶ added in v0.110.0
GetCommitCatfile looks up a commit by revision using an existing *catfile.Batch instance.
func GetCommitMessage ¶ added in v1.13.0
GetCommitMessage looks up a commit message and returns it in its entirety.
func GetTagCatfile ¶ added in v1.21.0
GetTagCatfile looks up a commit by tagID using an existing *catfile.Batch instance. note: we pass in the tagName because the tag name from refs/tags may be different than the name found in the actual tag object. We want to use the tagName found in refs/tags
func GitLogCommand ¶
func GitLogCommand(ctx context.Context, repo *gitalypb.Repository, revisions []string, paths []string, extraArgs ...string) (*command.Command, error)
GitLogCommand returns a Command that executes git log with the given the arguments
func IsNotFound ¶ added in v1.15.0
IsNotFound tests if an error is a "not found" error.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser holds necessary state for parsing a git log stream
func NewLogParser ¶
NewLogParser returns a new Parser
func (*Parser) Commit ¶
Commit returns a successfully parsed git log line. It should be called only when Parser.Parse() returns true.