Documentation ¶
Index ¶
- type Commit
- type Diff
- type Option
- type ParseState
- type Parser
- func (c *Parser) FromReader(ctx context.Context, stdOut io.Reader, commitChan chan Commit, isStaged bool)
- func (c *Parser) RepoPath(ctx context.Context, source string, head string, abbreviatedLog bool, ...) (chan Commit, error)
- func (c *Parser) Staged(ctx context.Context, source string) (chan Commit, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct { Hash string Author string Date time.Time Message strings.Builder Diffs []Diff Size int // in bytes }
Commit contains commit header info and diffs.
type Option ¶
type Option func(*Parser)
Option is used for adding options to Config.
func WithMaxCommitSize ¶
WithMaxCommitSize sets maxCommitSize option. Commits larger than maxCommitSize will be put in the commit channel and additional diffs will be added to a new commit.
func WithMaxDiffSize ¶
WithMaxDiffSize sets maxDiffSize option. Diffs larger than maxDiffSize will be truncated.
type ParseState ¶
type ParseState int
const ( Initial ParseState = iota CommitLine MergeLine AuthorLine DateLine MessageStartLine MessageLine MessageEndLine DiffLine ModeLine IndexLine FromFileLine ToFileLine BinaryFileLine HunkLineNumberLine HunkContentLine ParseFailure )
func (ParseState) String ¶
func (state ParseState) String() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser sets values used in GitParse.
func (*Parser) FromReader ¶
Click to show internal directories.
Click to hide internal directories.