bisect: --find-good: fix the docs - #10015
Open
badp wants to merge 1 commit into
Open
Conversation
josephlou5
reviewed
Aug 20, 2026
badp
force-pushed
the
bisect/find-good-docs
branch
5 times, most recently
from
August 20, 2026 22:31
ed1b18a to
f120e0b
Compare
josephlou5
reviewed
Aug 20, 2026
badp
force-pushed
the
bisect/find-good-docs
branch
from
August 26, 2026 21:27
f120e0b to
ce4b6e8
Compare
Looking at test_bisect_run_with_args, fake-bisector is being called with --require-file=c (= exit code 0 iff the file c is present), but with --find-good "status 0 means bad and other non-zero statuses mean good" (or so claims `jj bisect run --help`). So, when evaluating commit c adding file c, fake-bisector finds the file c, has an exit code 0, and that should make the commit bad, not good. However, the overall behavior of `jj` is self-consistent: jj calls the commits with the file 'good," the rest of the commits "bad," then declares that the comment that added the file was the first "good" commit. And that's what you'd expect to see from the incantation: `jj bisect run --find-good fake-bisector --require-file=c` SHOULD behave like it does in the test. The bug, then, is in the documentation. It's not true that `--find-good` inverts how COMMAND is interpreted: COMMAND is still expected to have exit codes 0 for good commits, and non-zero for bad commits. It's the expectations about the edges of the range that are flipped. This commit fixes the docs accordingly.
badp
force-pushed
the
bisect/find-good-docs
branch
from
August 26, 2026 21:29
ce4b6e8 to
865f070
Compare
josephlou5
approved these changes
Aug 27, 2026
josephlou5
left a comment
Contributor
There was a problem hiding this comment.
LGTM, but still needs maintainer review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Looking at
test_bisect_run_with_args,fake-bisectoris being called with--require-file=c(= exit code 0 iff the file c is present), but with--find-good"status 0 means bad and other non-zero statuses mean good" (or so claimsjj bisect run --help).So, when evaluating commit
cadding filec, fake-bisector finds the filec, has an exit code 0, and that should make the commit bad, not good.However, the overall behavior of
jjis self-consistent: jj calls the commits with the file 'good," the rest of the commits "bad," then declares that the comment that added the file was the first "good" commit. And that's what you'd expect to see from the incantation:jj bisect run --find-good fake-bisector --require-file=cshould behave like it does in the test.The bug, then, is in the documentation. It's not true that
--find-goodinverts howCOMMANDis interpreted:COMMANDis still expected to have exit codes 0 for good commits, and non-zero for bad commits. It's the expectations about the edges of the range that are flipped.This commit fixes the docs accordingly.
Checklist
If applicable:
CHANGELOG.mdREADME.md,docs/,demos/)cli/src/config-schema.json)how it works, how it's organized), including any code drafted by an LLM.
an eye towards deleting anything that is irrelevant, clarifying anything
that is confusing, and adding details that are relevant. This includes,
for example, commit descriptions, PR descriptions, and code comments.