Commit graph

7 commits

Author SHA1 Message Date
Scott Taylor
33ad38bfed templates: add "divergent" label to log for divergent changes
It would be good to include the word "divergent" in the log when a
change is divergent, since users are often unsure what's happening when
they see a divergent change, and giving them a term to search for would
be helpful. However, I don't think it looks good to put this label next
to the change ID itself if both are the same color, since it ends up
being hard to distinguish from the change offset at a glance. Also,
putting the label next to the change ID also messes up the alignment of
fields in the log. Therefore, I think it looks better to put the
"divergent" label at the end of the line.

Since divergence and hidden commits are similar, it makes sense for both
labels to be in the same place, so I also moved the hidden label to the
end for consistency.

One downside is that the labels are less obviously connected with the
change ID itself due to them being farther apart. I think this could be
fine, since they are still visually connected by being the same color.
2025-12-20 16:55:51 +00:00
Martin von Zweigbergk
980ac17d36 bisect: add missing closing backtick, make tests pass on Windows
This removes the dependencies on `true`, `false`, and `test`
executables, which are often not available on Windows.
2025-12-19 04:18:46 +00:00
Scott Taylor
0dffb6f108 templates: show change offsets for divergent and hidden commits
For now, I just replaced `??` with the change offset for divergent
commits. We can add an explicit "divergent" label later.
2025-12-16 02:02:31 +00:00
David Higgs
4140f9499c tests: exercise more bisect behaviors
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-11-01 23:17:31 +00:00
Martin von Zweigbergk
829b2ed261 bisect: deprecate --command <cmd> in favor of -- <cmd> <args>...
`jj bisect run --command` splits the argument on spaces, so
e.g. `--command 'cargo test'` will run `cargo` with `test` as
argument. It is hard to pass more complex commands to because we don't
parse e.g. quotes as the shell would (and we wouldn't match the user's
preferred shell even if we did).

This patch deprecates the `--command` argument in favor of positional
arguments, so the user can do things like this:

```
jj bisect run --range ..main -- bash -c 'jj duplicate -r xyz -B @ && cargo test'
```

That will run the tests with the `xyz` change applied.
2025-10-12 23:50:50 +00:00
Anton Älgmyr
41837fe930 bisect: Make bisect able to search for first good/bad revision in the range 2025-10-01 22:24:32 +00:00
Martin von Zweigbergk
c15cc344de cli: add jj bisect run command
This adds a command that automatically bisects a range of commits
using a specified command. By not having the interactive kind
(e.g. `jj bisect good/bad/skip/reset`), we avoid - for now at least -
having to decide where to store the state. The user can still achieve
interactive bisection by passing their shell as the bisection command.

Closes #2987.
2025-09-04 14:30:52 +00:00