This allows users to jump to the next conflict in the ancestors or children of
the start commit.
Continues work on #2126
Co-Authored-By: Noah Mayr <dev@noahmayr.com>
This allows users to easily filter a commit range by conflicts, which will be needed for `next/prev`
further down in the next commit. Users which benefit from it were also migrated.
In a repo of mine I wanted to do something like the following to push all of my
leaves to the remote as backup:
jj git push -c 'all:heads(base::) & mine() ~ empty()'
But couldn't, because `jj git push` doesn't handle large revsets, even though
it does handle multiple `-c` arguments, so I had to work out some pipe-to-xargs
command instead.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
The follow up diff will make `-c` accept large revsets, so it won't make any
sense to print out the original expression when multiple branches will be
created from it.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
This is another big subcommand module. Let's split it up.
I'm not a big fan of r#move syntax, but we already have one in src/commands,
so there's no point to avoid it.
The error message that says something like 'Workspace "default"
doesn't have a working copy' confused me when I saw it. The problem
it's describing is that the repo view doesn't have a working-copy
commit for the given workspace id. Saying "working-copy commit"
instead of "working copy" hopefully clarifies it a bit.
This basically supersedes the current "branch set" command. The plan is to turn
"branch set" into an "upsert" command, and deprecate "branch create". (#3584)
Maybe we can also add "branch set --new" flag to only allow creation of new
branches. One reason behind this proposed change is that "set" usually allows
both "creation" and "update". However, we also need a typo-safe version of
"set" to not create new branches by accident.
"jj branch move" is useful when advancing ancestor branches. Let's say you've
added a couple of commits on top of an existing PR branch, you can advance the
branch by "jj branch move --from 'heads(::@- & branches())' --to @-". If this
pattern is super common, maybe we can add --advance flag for short.
One drawback of this change is that "git branch --move" is equivalent to
"jj branch rename". I personally don't find this is confusing, but it's true
that "move" sometimes means "rename".
This basically backs out 8706fadca1 "cli: inline check for
non-fast-forwardable branch move." I'm going to add another subcommand that
moves existing branches.
By running CI on push to any branch, collaborators can check that CI
passes before sending for review, reducing mail spam and wasted
reviewer time before the code is ready.
Otherwise they wouldn't be sorted in help. I also reordered the match statement.
Since subcommands are split to per-file modules, there's no point to keep some
logical ordering.