Documentation
¶
Overview ¶
Package bisect wraps git bisect to automatically identify the commit that introduced a regression. It runs a user-supplied check function across a commit range and returns the offending commit with its diff.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bisect ¶
type Bisect struct {
// contains filtered or unexported fields
}
Bisect wraps git bisect operations.
func New ¶
New creates a Bisect instance backed by the project's git wrapper. If git is nil, a minimal exec-based fallback is used (kept for backward compatibility with callers that don't wire the wrapper).
func (*Bisect) Run ¶
func (b *Bisect) Run(sessionStartHash, headHash string, checkFn func() bool) (result *BisectResult, err error)
Run performs a git bisect between sessionStartHash (good) and headHash (bad) using checkFn to determine pass/fail at each step. checkFn returns true if the commit passes verification, false if it fails. On git bisect reset failure, returns an error wrapping ErrBisectResetFailed (M-29).
type BisectResult ¶
type BisectResult struct {
OffendingCommit git.CommitInfo
Diff string
}
BisectResult holds the offending commit and its diff.