Documentation
¶
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 encoded patch bytes, 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 Git objects and working tree state using pure Go.
func NewRepository ¶
func NewRepository(dir string, limits Limits) (*Repository, error)
func (*Repository) Compare ¶
Compare resolves an immutable committed range and returns no partial result on command, parser, or resource-limit failure.
func (*Repository) CompareUncommitted ¶ added in v0.5.2
func (r *Repository) CompareUncommitted(ctx context.Context) (Result, error)
CompareUncommitted inspects unstaged, staged, and untracked changes in the working tree.
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.