Artifact 343e4afe01f9e36a1a321256e4f66399e50510ed46b690de12d0a3e3c381137e:
- File
cli/repo_bisect.go
— part of check-in
[f5744359d3]
at
2026-04-19 16:30:54
on branch trunk
— Initial open source release
libfossil is a pure-Go implementation of the Fossil SCM, reading and writing the same .fossil SQLite repository format as upstream Fossil.
This is the first public release of code that previously lived in a private repository. The module path is github.com/danmestas/libfossil and the binary is named libfossil to avoid $PATH collisions with upstream fossil.
Included: - Repo lifecycle (create, clone), checkout/checkin, timeline, merge, diff, annotate, shun, tag, branch, bisect, stash, undo/redo - Sync-over-HTTP protocol (client and handler) - Two SQLite drivers: modernc (pure Go, default) and ncruces (wasm-capable) - Observer interfaces (SyncObserver, CheckoutObserver) with an optional OpenTelemetry implementation in observer/otel (separate submodule) - Deterministic simulation testing harness with BUGGIFY fault injection - Kong-based embeddable CLI under cli/ and a standalone binary under cmd/libfossil/ (user: [email protected], size: 2736) [annotate] [blame] [check-ins using]
package cli import "fmt" // RepoBisectCmd groups binary search operations. type RepoBisectCmd struct { Good RepoBisectGoodCmd `cmd:"" help:"Mark version as good"` Bad RepoBisectBadCmd `cmd:"" help:"Mark version as bad"` Next RepoBisectNextCmd `cmd:"" help:"Check out midpoint version"` Skip RepoBisectSkipCmd `cmd:"" help:"Skip current version"` Reset RepoBisectResetCmd `cmd:"" help:"Clear bisect state"` Ls RepoBisectLsCmd `cmd:"" help:"Show bisect path"` Status RepoBisectStatusCmd `cmd:"" help:"Show bisect state"` } // RepoBisectGoodCmd marks a version as good. type RepoBisectGoodCmd struct { Version string `arg:"" optional:"" help:"Version to mark (default: current checkout)"` Dir string `short:"d" help:"Checkout directory" default:"."` } func (c *RepoBisectGoodCmd) Run(g *Globals) error { return fmt.Errorf("bisect: not yet implemented (requires checkout DB)") } // RepoBisectBadCmd marks a version as bad. type RepoBisectBadCmd struct { Version string `arg:"" optional:"" help:"Version to mark (default: current checkout)"` Dir string `short:"d" help:"Checkout directory" default:"."` } func (c *RepoBisectBadCmd) Run(g *Globals) error { return fmt.Errorf("bisect: not yet implemented (requires checkout DB)") } // RepoBisectSkipCmd skips the current version. type RepoBisectSkipCmd struct { Version string `arg:"" optional:"" help:"Version to skip (default: current checkout)"` Dir string `short:"d" help:"Checkout directory" default:"."` } func (c *RepoBisectSkipCmd) Run(g *Globals) error { return fmt.Errorf("bisect: not yet implemented (requires checkout DB)") } // RepoBisectNextCmd checks out the bisect midpoint version. type RepoBisectNextCmd struct { Dir string `short:"d" help:"Checkout directory" default:"."` } func (c *RepoBisectNextCmd) Run(g *Globals) error { return fmt.Errorf("bisect: not yet implemented (requires checkout DB)") } // RepoBisectResetCmd clears bisect state. type RepoBisectResetCmd struct { Dir string `short:"d" help:"Checkout directory" default:"."` } func (c *RepoBisectResetCmd) Run(g *Globals) error { return fmt.Errorf("bisect: not yet implemented (requires checkout DB)") } // RepoBisectLsCmd shows the bisect path. type RepoBisectLsCmd struct { Dir string `short:"d" help:"Checkout directory" default:"."` } func (c *RepoBisectLsCmd) Run(g *Globals) error { return fmt.Errorf("bisect: not yet implemented (requires checkout DB)") } // RepoBisectStatusCmd shows bisect state. type RepoBisectStatusCmd struct { Dir string `short:"d" help:"Checkout directory" default:"."` } func (c *RepoBisectStatusCmd) Run(g *Globals) error { return fmt.Errorf("bisect: not yet implemented (requires checkout DB)") }