pub struct Bisect;Expand description
Bisect operations — start, good, bad, skip, reset, and reading the state of a bisect already in progress.
Uses the git CLI. Every mutating call is a local operation; none touches the network.
Implementations§
Source§impl Bisect
impl Bisect
Sourcepub fn in_progress(repo: &Repository) -> bool
pub fn in_progress(repo: &Repository) -> bool
Whether a bisect is currently running.
A file-existence check, deliberately: this is called from the
transient builder on the actor thread to decide which rows to
show, and spawning git there to answer a yes/no question
would be process-spawn latency on a keystroke path.
.git/BISECT_LOG is what git itself creates on bisect start
and removes on bisect reset.
Sourcepub fn state(repo: &Repository) -> Result<Option<BisectState>>
pub fn state(repo: &Repository) -> Result<Option<BisectState>>
The state of the bisect in progress, or None if none is.
Sourcepub fn start(
repo: &Repository,
bad: Option<&str>,
good: Option<&str>,
) -> Result<BisectStep>
pub fn start( repo: &Repository, bad: Option<&str>, good: Option<&str>, ) -> Result<BisectStep>
Start a bisect.
bad and good are optional: git bisect start with neither
begins an unbounded bisect the user then narrows with good /
bad, which is git’s own behaviour and worth preserving.
Sourcepub fn good(repo: &Repository, rev: Option<&str>) -> Result<BisectStep>
pub fn good(repo: &Repository, rev: Option<&str>) -> Result<BisectStep>
Mark a revision good (None = the one checked out).
Sourcepub fn bad(repo: &Repository, rev: Option<&str>) -> Result<BisectStep>
pub fn bad(repo: &Repository, rev: Option<&str>) -> Result<BisectStep>
Mark a revision bad (None = the one checked out).
Sourcepub fn skip(repo: &Repository, rev: Option<&str>) -> Result<BisectStep>
pub fn skip(repo: &Repository, rev: Option<&str>) -> Result<BisectStep>
Skip a revision that cannot be tested (None = the one checked
out).
Sourcepub fn reset(repo: &Repository) -> Result<()>
pub fn reset(repo: &Repository) -> Result<()>
End the bisect and return to the ref it started from.
Sourcepub fn log(repo: &Repository) -> Result<String>
pub fn log(repo: &Repository) -> Result<String>
The bisect log — every mark made so far, in git’s replayable format.