Open emilykfox opened 1 year ago
Oops, I accidentally closed this with:
I don't think this is fully resolved, since there are still a few open questions from that PR, and it might not be exactly what people want. But, if you just want your branches to move forward when you run jj commit
and jj new
this may be a solution for you. The instructions for setting this up are in the first comment in the PR.
This is an experimental feature that could be removed in the future. It should be available in the 0.17 release, or now if you build from source at head. Please leave any feedback here:
Based on @emesterhazy, could revsets or other types of patterns be implemented, such as thunk()
? Having disabled-branches = ["thunk()"]
seems like a useful way to declare this.
Possibly this should be the default to prevent footguns? Or maybe at least the recommended default in the docs for enabling this.
Is your feature request related to a problem? Please describe. I often work directly on
main
for personal projects, but to successfully push my changes to GitHub, I have to run something likejj commit -m [message] && jj branch set main -r @-
orjj branch set main && jj commit -m [message]
. The former is error prone as it's easy to forget the-r
flag. The latter feels slightly unnatural as there's a brief moment where themain
branch is pointing to something without a description. They're both pretty verbose.Describe the solution you'd like In Discord, @martinvonz suggested adding a
--advance-branches
flag tojj commit
which could move any branches pointing to the old@-
to point to the new@-
.Describe alternatives you've considered None
Additional context See the brief conversation starting at https://discord.com/channels/968932220549103686/969829516539228222/1159510245849186335.
Probably more important is that this feature would also improve workflows that involve adding several commits in sequence to a single feature branch.