Documentation
¶
Index ¶
- func EachPathLastCommit(ctx context.Context, objectReader catfile.ObjectContentReader, ...) error
- func GitLogCommand(ctx context.Context, repo gitcmd.RepositoryExecutor, revisions []git.Revision, ...) (*command.Command, error)
- func LastCommitForPath(ctx context.Context, objectReader catfile.ObjectContentReader, ...) (*catfile.Commit, error)
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EachPathLastCommit ¶
func EachPathLastCommit( ctx context.Context, objectReader catfile.ObjectContentReader, repo gitcmd.RepositoryExecutor, revision git.Revision, paths []string, options *gitalypb.GlobalOptions, fn func(string, *catfile.Commit) error, ) error
EachPathLastCommit returns the last commit that modified each path in `paths`. It does so by calling the provided function `fn` for each path in `paths` with the related commit. It is up to the caller to decide what to do with the commit then.
func GitLogCommand ¶
func GitLogCommand(ctx context.Context, repo gitcmd.RepositoryExecutor, revisions []git.Revision, paths []string, options *gitalypb.GlobalOptions, extraArgs ...gitcmd.Option) (*command.Command, error)
GitLogCommand returns a Command that executes git log with the given the arguments
func LastCommitForPath ¶
func LastCommitForPath( ctx context.Context, objectReader catfile.ObjectContentReader, repo gitcmd.RepositoryExecutor, revision git.Revision, path string, options *gitalypb.GlobalOptions, ) (*catfile.Commit, error)
LastCommitForPath returns the last commit which modified path.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser holds necessary state for parsing a git log stream
func NewParser ¶
func NewParser(ctx context.Context, catfileCache catfile.Cache, repo gitcmd.RepositoryExecutor, src io.Reader) (*Parser, func(), error)
NewParser 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.