Documentation ¶
Index ¶
- 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 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 ¶
This section is empty.
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 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.
Click to show internal directories.
Click to hide internal directories.