Documentation
¶
Overview ¶
Package git reads committed changes without consulting the working tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAmbiguousBase = errors.New("comparison has no unique merge base")
View Source
var ErrInvalidLimits = errors.New("invalid Git input limits")
View Source
var ErrInvalidRevision = errors.New("invalid commit revision")
View Source
var ErrLimit = errors.New("git input limit exceeded")
View Source
var ErrMalformedDiff = errors.New("malformed Git diff")
View Source
var ErrMissingSource = errors.New("work item source is unavailable")
Functions ¶
This section is empty.
Types ¶
type Limits ¶
Limits cap subprocess output, each source blob, and the number of work items. Zero fields select finite defaults.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository reads only committed Git objects.
func NewRepository ¶
func NewRepository(dir string, limits Limits) (*Repository, error)
type Result ¶
type Result struct {
Revisions Revisions
Items []WorkItem
Skips []Skip
// contains filtered or unexported fields
}
Result holds a complete comparison. Sources are copied out on request.
type Side ¶
type Side string
Side identifies the committed file whose changed lines carry the anchor.
type Skip ¶
type Skip struct {
OldPath string
NewPath string
Reason SkipReason
}
type SkipReason ¶
type SkipReason string
const ( SkipBinary SkipReason = "binary" SkipNonRegular SkipReason = "non_regular" SkipNoLines SkipReason = "no_changed_lines" )
Click to show internal directories.
Click to hide internal directories.