No description
  • OCaml 89.9%
  • Dune 10.1%
Find a file
2026-06-09 22:05:02 +02:00
bin Support predicate negation 2026-06-08 23:52:37 +02:00
lib Colorize counter in progress line 2026-06-09 22:05:02 +02:00
test Support predicate negation 2026-06-08 23:52:37 +02:00
.gitignore Initial commit, basic interactive use 2026-06-08 21:43:00 +02:00
.ocamlformat Print progress 2026-06-08 23:29:02 +02:00
bisect.opam Write some words 2026-06-08 23:29:04 +02:00
dune-project Write some words 2026-06-08 23:29:04 +02:00
LICENSE Write some words 2026-06-08 23:29:04 +02:00
readme.md Write some words 2026-06-08 23:29:04 +02:00

bisect

A program for bisection of integer ranges

Description

bisect is a program for bisecting integer ranges. It takes a known good index and a bad index and finds the first bad index, e.g. the commit that introduced a bug or the optimization pass which causes a miscompile. Both positive (good < bad) and negative (bad < good) ranges are supported.

bisect either works with a command to distinguish good or bad outcomes, or in interactive mode.

Examples

A simple example, script.sh returns 0 on good outcomes and non-0 on bad ones.

bisect 0 10 bash script.sh {}

Use -- for negative values, otherwise the positional argument is interpreted as an option.

bisect -- 123 -10 check.sh {}

git bisect (but I haven't had a chance to test this for real)

bisect 5 0 -- sh -c 'git checkout main~{} && dune test'

If the command is omitted, bisect in interactive mode

bisect 0 10