Help us shape the future of Go! Take the 2026 Go Developer Survey

bisect

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package bisect implements binary search through Fossil commit history. It stores session state in the checkout DB's vvar table and uses BFS path-finding to locate the midpoint between known-good and known-bad commits.

Index

Constants

This section is empty.

Variables

View Source
var ErrBisectComplete = errors.New("bisect complete")

ErrBisectComplete is returned by Next when the search has converged.

Functions

This section is empty.

Types

type ListEntry

type ListEntry struct {
	RID   libfossil.FslID
	UUID  string
	Date  string
	Label string
}

ListEntry describes a single node in the bisect path.

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session manages a bisect operation, persisting state in the vvar table.

func NewSession

func NewSession(db *sql.DB) *Session

NewSession creates a new bisect session backed by the given checkout DB.

func (*Session) List

func (s *Session) List(currentRID libfossil.FslID) ([]ListEntry, error)

List returns all commits between good and bad, labelled appropriately.

func (*Session) MarkBad

func (s *Session) MarkBad(rid libfossil.FslID) error

MarkBad records rid as a known-bad commit.

func (*Session) MarkGood

func (s *Session) MarkGood(rid libfossil.FslID) error

MarkGood records rid as a known-good commit.

func (*Session) Next

func (s *Session) Next() (libfossil.FslID, error)

Next returns the midpoint commit to test next. If the bisect has converged, it returns ErrBisectComplete with the bad RID embedded in the error message.

func (*Session) Reset

func (s *Session) Reset()

Reset clears all bisect state from the vvar table.

func (*Session) Skip

func (s *Session) Skip(rid libfossil.FslID) error

Skip marks rid as skipped (neither good nor bad).

func (*Session) Status

func (s *Session) Status() StatusInfo

Status returns information about the current bisect session.

type StatusInfo

type StatusInfo struct {
	Good  libfossil.FslID
	Bad   libfossil.FslID
	Log   string
	Steps int
}

StatusInfo describes the current bisect state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL