Implements the Git.Command behaviour for git bisect.
Supports starting, marking good/bad commits, skipping, resetting, viewing the bisect log, and replaying a bisect session.
Unsupported subcommands
visualize- requires a GUI (gitk) and is not suitable for CLI wrapping.run- requires script execution which adds complexity beyond simple command wrapping. May be added in a future release.
Summary
Types
Functions
Returns the argument list for git bisect.
Builds the subcommand and optional ref argument based on the struct fields.
Examples
iex> Git.Commands.Bisect.args(%Git.Commands.Bisect{start: true})
["bisect", "start"]
iex> Git.Commands.Bisect.args(%Git.Commands.Bisect{bad: :head})
["bisect", "bad"]
iex> Git.Commands.Bisect.args(%Git.Commands.Bisect{bad: "abc1234"})
["bisect", "bad", "abc1234"]
iex> Git.Commands.Bisect.args(%Git.Commands.Bisect{good: :head})
["bisect", "good"]
iex> Git.Commands.Bisect.args(%Git.Commands.Bisect{reset: true})
["bisect", "reset"]
iex> Git.Commands.Bisect.args(%Git.Commands.Bisect{log: true})
["bisect", "log"]
@spec parse_output(String.t(), non_neg_integer()) :: {:ok, Git.BisectResult.t()} | {:error, {String.t(), non_neg_integer()}}
Parses the output of git bisect.
Returns {:ok, %Git.BisectResult{}} on success. The status field
indicates the current state of the bisect session. On failure, returns
{:error, {stdout, exit_code}}.