Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions cli/src/commands/bisect/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ use crate::ui::Ui;
/// details).
///
/// It is assumed that if a given revision is "bad", then all its descendants
/// in the input range are also "bad".
///
/// The target of the bisection can be inverted to look for the first "good"
/// revision by passing `--find-good`.
/// in the input range are also "bad". Pass `--find-good` to invert this
/// assumption: if a given revision is "good", all of its descendants are
/// assumed to be "good". `jj bisect run` will then look for the first "good"
/// revision.
///
/// Hint: You can pass your shell as the command, then run manual tests in a
/// script. When you're done, make sure to exit the shell with an appropriate
Expand Down Expand Up @@ -101,9 +101,13 @@ pub(crate) struct BisectRunArgs {

/// Find the first good revision instead
///
/// The interpretation of exit statuses will be inverted (excluding special
/// exit statuses), so status 0 means bad and other non-zero statuses mean
/// good.
/// Normally, `jj bisect run` looks for a revision in the provided `REVSETS`
/// that turned the working copy from good to bad. With `--find-good`, `jj
/// bisect run` instead assumes that the working copy changed from bad
/// to good.
///
/// `COMMAND` is still expected to exit with code 0 if and only if the
/// revision is good.
#[arg(long, value_name = "TARGET", default_value_t = false)]
find_good: bool,
}
Expand Down
12 changes: 7 additions & 5 deletions cli/tests/cli-reference@.md.snap
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ by running the given command (see the documentation for `<COMMAND>` for
details).

It is assumed that if a given revision is "bad", then all its descendants
in the input range are also "bad".

The target of the bisection can be inverted to look for the first "good"
revision by passing `--find-good`.
in the input range are also "bad". Pass `--find-good` to invert this
assumption: if a given revision is "good", all of its descendants are
assumed to be "good". `jj bisect run` will then look for the first "good"
revision.

Hint: You can pass your shell as the command, then run manual tests in a
script. When you're done, make sure to exit the shell with an appropriate
Expand Down Expand Up @@ -376,7 +376,9 @@ cargo test"
The union of all given ranges are used as the input for the bisection.
* `--find-good` — Find the first good revision instead

The interpretation of exit statuses will be inverted (excluding special exit statuses), so status 0 means bad and other non-zero statuses mean good.
Normally, `jj bisect run` looks for a revision in the provided `REVSETS` that turned the working copy from good to bad. With `--find-good`, `jj bisect run` instead assumes that the working copy changed from bad to good.

`COMMAND` is still expected to exit with code 0 if and only if the revision is good.

Default value: `false`

Expand Down