Documentation ¶
Index ¶
- func IsErrEmptyRemoteRepository(err error) bool
- type Chunk
- type Commit
- func (c *Commit) CanDiff() (result bool)
- func (c *Commit) FileChanges(filter *FileChangeFilter) (result []*FileChange, err error)
- func (c *Commit) FileContents(path string) (result string, err error)
- func (c *Commit) HasParents() (result bool, err error)
- func (c *Commit) IsMergeCommit() (result bool, err error)
- func (c *Commit) Parents() (result []*Commit, err error)
- type CommitFilter
- func (cf *CommitFilter) CanProvideExactCommitHashValues() bool
- func (cf *CommitFilter) CanProvideExactValues() bool
- func (cf *CommitFilter) ExactCommitHashValues() (result manip.Set)
- func (cf *CommitFilter) ExactValues() (result manip.Set)
- func (cf *CommitFilter) FilterSet(items manip.Set)
- func (cf *CommitFilter) Includes(commit interface{}) (result bool)
- func (cf *CommitFilter) IncludesAllOf(items manip.Set) bool
- func (cf *CommitFilter) IncludesAnyOf(items manip.Set) bool
- func (cf *CommitFilter) IncludesAnything() bool
- func (cf *CommitFilter) IsIncludedInLogResults(commit *Commit) (result, more bool)
- func (cf *CommitFilter) OldestCommitIsIncluded() (result bool)
- type Diff
- func (d *Diff) Incr() (ok bool)
- func (d *Diff) IncrBy(by int) (ok bool)
- func (d *Diff) IsLastLine(lineNum int) bool
- func (d *Diff) OnLastLine() bool
- func (d *Diff) SetLine(lineNum int) (ok bool)
- func (d *Diff) String() (result string)
- func (d *Diff) UntilContainsCollectCode(substring string, collected *[]string) (ok bool)
- func (d *Diff) UntilContainsCollectTrimmedCode(substring string, collected *[]string) (ok bool)
- func (d *Diff) UntilMatchesIncrement(re *regexp.Regexp) (ok bool)
- func (d *Diff) UntilTrueCollectCode(lineMatch lineMatch, collected *[]string) (ok bool)
- func (d *Diff) UntilTrueCollectTrimmedCode(lineMatch lineMatch, collected *[]string) (ok bool)
- func (d *Diff) UntilTrueIncrement(lineMatch lineMatch) (ok bool)
- func (d *Diff) WhileContainsCollectCode(substring string, collected *[]string) (ok bool)
- func (d *Diff) WhileContainsCollectTrimmedCode(substring string, collected *[]string) (ok bool)
- func (d *Diff) WhileMatchesIncrement(re *regexp.Regexp) (ok bool)
- func (d *Diff) WhileTrueCollectCode(lineMatch lineMatch, collected *[]string) (ok bool)
- func (d *Diff) WhileTrueCollectTrimmedCode(lineMatch lineMatch, collected *[]string) (ok bool)
- func (d *Diff) WhileTrueDo(lineMatch lineMatch, lineAction lineAction) (ok bool)
- func (d *Diff) WhileTrueIncrement(lineMatch lineMatch) (ok bool)
- type DiffOperation
- type FileChange
- type FileChangeFilter
- func (cf *FileChangeFilter) CanProvideExactValues() bool
- func (cf *FileChangeFilter) ExactValues() manip.Set
- func (cf *FileChangeFilter) FilterSet(fileChanges manip.Set)
- func (cf *FileChangeFilter) Includes(input interface{}) (result bool)
- func (cf *FileChangeFilter) IncludesAllOf(items manip.Set) bool
- func (cf *FileChangeFilter) IncludesAnyOf(items manip.Set) bool
- func (cf *FileChangeFilter) IncludesAnything() (result bool)
- type Git
- type Line
- type Repository
- func (r *Repository) Commit(hashString string) (result *Commit, err error)
- func (r *Repository) EmptyTree() *Tree
- func (r *Repository) FetchAll(url string) (err error)
- func (r *Repository) GetOldestCommit() (result *Commit, err error)
- func (r *Repository) Log(commitFilter *CommitFilter) (result []*Commit, err error)
- func (r *Repository) Spawn() (result *Repository, err error)
- type Tree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chunk ¶
type Chunk struct { Operation DiffOperation Content string }
type Commit ¶
type Commit struct { Hash string Message string Date time.Time AuthorName string AuthorEmail string Oldest bool Tree *Tree // contains filtered or unexported fields }
func (*Commit) FileChanges ¶
func (c *Commit) FileChanges(filter *FileChangeFilter) (result []*FileChange, err error)
func (*Commit) HasParents ¶
func (*Commit) IsMergeCommit ¶
type CommitFilter ¶
type CommitFilter struct { HashFilter manip.Filter EarliestTime time.Time LatestTime time.Time LatestTimeSet bool ExcludeNoDiffCommits bool }
func NewCommitFilter ¶
func NewEmptyCommitFilter ¶
func NewEmptyCommitFilter() *CommitFilter
func (*CommitFilter) CanProvideExactCommitHashValues ¶
func (cf *CommitFilter) CanProvideExactCommitHashValues() bool
func (*CommitFilter) CanProvideExactValues ¶
func (cf *CommitFilter) CanProvideExactValues() bool
func (*CommitFilter) ExactCommitHashValues ¶
func (cf *CommitFilter) ExactCommitHashValues() (result manip.Set)
func (*CommitFilter) ExactValues ¶
func (cf *CommitFilter) ExactValues() (result manip.Set)
func (*CommitFilter) FilterSet ¶
func (cf *CommitFilter) FilterSet(items manip.Set)
func (*CommitFilter) Includes ¶
func (cf *CommitFilter) Includes(commit interface{}) (result bool)
func (*CommitFilter) IncludesAllOf ¶
func (cf *CommitFilter) IncludesAllOf(items manip.Set) bool
func (*CommitFilter) IncludesAnyOf ¶
func (cf *CommitFilter) IncludesAnyOf(items manip.Set) bool
func (*CommitFilter) IncludesAnything ¶
func (cf *CommitFilter) IncludesAnything() bool
func (*CommitFilter) IsIncludedInLogResults ¶
func (cf *CommitFilter) IsIncludedInLogResults(commit *Commit) (result, more bool)
func (*CommitFilter) OldestCommitIsIncluded ¶
func (cf *CommitFilter) OldestCommitIsIncluded() (result bool)
type Diff ¶
type Diff struct { Line *Line SetLineHook lineAction // contains filtered or unexported fields }
func (*Diff) IsLastLine ¶
func (*Diff) OnLastLine ¶
func (*Diff) UntilContainsCollectCode ¶
func (*Diff) UntilContainsCollectTrimmedCode ¶
func (*Diff) UntilMatchesIncrement ¶
func (*Diff) UntilTrueCollectCode ¶
func (*Diff) UntilTrueCollectTrimmedCode ¶
func (*Diff) UntilTrueIncrement ¶
func (*Diff) WhileContainsCollectCode ¶
func (*Diff) WhileContainsCollectTrimmedCode ¶
func (*Diff) WhileMatchesIncrement ¶
func (*Diff) WhileTrueCollectCode ¶
func (*Diff) WhileTrueCollectTrimmedCode ¶
func (*Diff) WhileTrueDo ¶
func (*Diff) WhileTrueIncrement ¶
type DiffOperation ¶
type DiffOperation int
const ( Equal DiffOperation = iota Delete Add )
func NewDiffOperationFromGit ¶
func NewDiffOperationFromGit(gdo gitdiff.Operation) DiffOperation
func (DiffOperation) Prefix ¶
func (i DiffOperation) Prefix() string
func (DiffOperation) String ¶
func (i DiffOperation) String() string
type FileChange ¶
type FileChange struct { Commit *Commit Path string Chunks []*Chunk IsBinaryOrEmpty bool // contains filtered or unexported fields }
func NewFileChange ¶
func NewFileChange(commit *Commit, gitFileChange *gitobject.Change) (result *FileChange, err error)
func (*FileChange) Diff ¶
func (fcc *FileChange) Diff() (result *Diff, err error)
func (*FileChange) FileContents ¶
func (fcc *FileChange) FileContents() (result string, err error)
func (*FileChange) FileType ¶
func (fcc *FileChange) FileType() (result string)
func (*FileChange) HasCodeChanges ¶
func (fcc *FileChange) HasCodeChanges() (result bool)
func (*FileChange) IsDeletion ¶
func (fcc *FileChange) IsDeletion() bool
type FileChangeFilter ¶
type FileChangeFilter struct { PathFilter *manip.RegexpFilter ExcludeFileDeletions bool ExcludeBinaryOrEmpty bool ExcludeOnesWithNoCodeChanges bool }
func NewFileChangeFilter ¶
func NewFileChangeFilter( pathFilter *manip.RegexpFilter, excludeFileDeletions bool, excludeBinaryOrEmpty bool, excludeOnesWithNoCodeChanges bool, ) (result *FileChangeFilter)
func (*FileChangeFilter) CanProvideExactValues ¶
func (cf *FileChangeFilter) CanProvideExactValues() bool
func (*FileChangeFilter) ExactValues ¶
func (cf *FileChangeFilter) ExactValues() manip.Set
func (*FileChangeFilter) FilterSet ¶
func (cf *FileChangeFilter) FilterSet(fileChanges manip.Set)
func (*FileChangeFilter) Includes ¶
func (cf *FileChangeFilter) Includes(input interface{}) (result bool)
func (*FileChangeFilter) IncludesAllOf ¶
func (cf *FileChangeFilter) IncludesAllOf(items manip.Set) bool
func (*FileChangeFilter) IncludesAnyOf ¶
func (cf *FileChangeFilter) IncludesAnyOf(items manip.Set) bool
func (*FileChangeFilter) IncludesAnything ¶
func (cf *FileChangeFilter) IncludesAnything() (result bool)
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func (*Git) IsCloneValid ¶
func (*Git) OpenRepository ¶
func (g *Git) OpenRepository(cloneDir string) (result *Repository, err error)
func (*Git) ValidateClone ¶
type Line ¶
type Line struct { Num int NumInFile int Pre string Code string CodeTrimmed string IsEqu bool IsAdd bool IsDel bool }
func (*Line) StartsWith ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func (*Repository) Commit ¶
func (r *Repository) Commit(hashString string) (result *Commit, err error)
func (*Repository) EmptyTree ¶
func (r *Repository) EmptyTree() *Tree
func (*Repository) FetchAll ¶
func (r *Repository) FetchAll(url string) (err error)
func (*Repository) GetOldestCommit ¶
func (r *Repository) GetOldestCommit() (result *Commit, err error)
func (*Repository) Log ¶
func (r *Repository) Log(commitFilter *CommitFilter) (result []*Commit, err error)
func (*Repository) Spawn ¶
func (r *Repository) Spawn() (result *Repository, err error)
Click to show internal directories.
Click to hide internal directories.