diff --git a/cli/src/commands/bisect/run.rs b/cli/src/commands/bisect/run.rs index 34492cf2ccb..864aa10b348 100644 --- a/cli/src/commands/bisect/run.rs +++ b/cli/src/commands/bisect/run.rs @@ -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 @@ -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, } diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 4af957ae9d9..3d11e105aa2 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -338,10 +338,10 @@ by running the given command (see the documentation for `` 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 @@ -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`