Documentation ¶
Index ¶
- func CommitMessage(cmd CommandRunner, sha string) (string, error)
- func CountLines(body []byte) (lines []int)
- func CurrentBranch(cmd CommandRunner) (string, error)
- func HeadCommit(cmd CommandRunner) (string, error)
- func RunGit(args ...string) (content []byte, err error)
- type BodyDiff
- type CommandRunner
- type FileBlames
- type FileChange
- type FileStatus
- type LineBlame
- type LineBlames
- type Path
- type PathDiff
- type PathFilter
- type PathType
- type TypeDiff
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitMessage ¶ added in v0.17.0
func CommitMessage(cmd CommandRunner, sha string) (string, error)
func CountLines ¶ added in v0.40.1
func CurrentBranch ¶
func CurrentBranch(cmd CommandRunner) (string, error)
func HeadCommit ¶
func HeadCommit(cmd CommandRunner) (string, error)
Types ¶
type CommandRunner ¶
type FileBlames ¶
type FileBlames map[string]LineBlames
type FileChange ¶ added in v0.40.1
type FileChange struct { Path PathDiff Body BodyDiff Commits []string Status FileStatus }
func Changes ¶ added in v0.40.1
func Changes(cmd CommandRunner, baseBranch string, filter PathFilter) ([]*FileChange, error)
type FileStatus ¶ added in v0.40.1
type FileStatus rune
const ( FileAdded FileStatus = 'A' FileCopied FileStatus = 'C' FileDeleted FileStatus = 'D' FileRenamed FileStatus = 'R' FileModified FileStatus = 'M' FileTypeChanged FileStatus = 'T' )
type LineBlames ¶
type LineBlames []LineBlame
func Blame ¶
func Blame(cmd CommandRunner, path, commit string) (lines LineBlames, err error)
type Path ¶ added in v0.40.1
func (Path) EffectivePath ¶ added in v0.40.1
type PathFilter ¶ added in v0.51.0
type PathFilter struct {
// contains filtered or unexported fields
}
func NewPathFilter ¶ added in v0.51.0
func NewPathFilter(include, exclude, relaxed []*regexp.Regexp) PathFilter
func (PathFilter) IsPathAllowed ¶ added in v0.51.0
func (pf PathFilter) IsPathAllowed(path string) bool
func (PathFilter) IsRelaxed ¶ added in v0.51.0
func (pf PathFilter) IsRelaxed(path string) bool
Click to show internal directories.
Click to hide internal directories.