Problem
When my pull requests are falling behind main, I’d like to synchronize them all with a single command - rebasing them all onto main, while maintaining the various stacks as appropriate.
Current State
As far as I can tell, the following jj commands actually work pretty well for this:
jj git fetch && \
jj rebase -b “mutable() & mine()” -d main && \
jj abandon -r “mutable() & empty()”
The final jj abandon even serves to clean up pull requests that have just been jj spr land ‘ed! Which is nice.
However, this is a long command, and is something that I think would make sense for jj-spr to be able to handle itself natively. I’m also not 100% sure the above is ideal for every situation (although I've been using an alias of it for a while with good success).
Proposal
A new command would be introduced, jj spr sync.
It would do essentially the same thing as the above 3 commands, but by default it should only rebase the current branch (-b @). A flag --all can be used to operate on -b “mutable() & mine()” instead, for syncing every pull request at the same time.
Problem
When my pull requests are falling behind main, I’d like to synchronize them all with a single command - rebasing them all onto main, while maintaining the various stacks as appropriate.
Current State
As far as I can tell, the following
jjcommands actually work pretty well for this:The final
jj abandoneven serves to clean up pull requests that have just beenjj spr land‘ed! Which is nice.However, this is a long command, and is something that I think would make sense for jj-spr to be able to handle itself natively. I’m also not 100% sure the above is ideal for every situation (although I've been using an alias of it for a while with good success).
Proposal
A new command would be introduced,
jj spr sync.It would do essentially the same thing as the above 3 commands, but by default it should only rebase the current branch (
-b @). A flag--allcan be used to operate on-b “mutable() & mine()”instead, for syncing every pull request at the same time.