You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It might be nice for users to have a convenient way to move the "current branch" bookmark up (for workflows that are closer to git-like), rather than needing to manually specify the bookmark and the position to move to.
Describe the solution you'd like jj bookmark fastforward (name/options/... could easily be bikeshed, I am more so talking about the semantics) would take the one "obvious" bookmark, and move it to the one "obvious" revision. If there isn't an obvious one for either, then it should not do anything, and instead request the user to use jj bookmark move.
Regarding "obvious":
one way to define an "obvious" bookmark is to be the nearest bookmark in the ancestors of @; possibly more restricted is to ensure it satisfies push-bookmark-prefix. I'm not sure how restricted we'd like this (possibly configurable by options)?
for an "obvious" target to move to: @ is pretty obvious, but we also probably don't want to use @ if it is an entirely empty commmit, in which case we probably want to use @-
the intention with "fast forward" naming is to have similar semantics to not allowing backwards moves
Describe alternatives you've considered
I am currently using this alias:
# Fast forward my latest bookmark on the current branch to the latest non-empty# (or merge) commit.ff = [
"bookmark", "move",
"--from", "latest(bookmarks(jayb) & ancestors(@))",
"--to", "latest(ancestors(@) & (merges() | ~empty()))"
]
which works fine for my use case, but obviously it only works for people who share my name 🙃 It is possible I am not even using the ideal/fastest/optimal/... revsets here, but at least all the time that I've used it so far, it has not failed me (although I haven't used it particularly long). However, I suspect that this particular operation is common enough that it might be something to consider being a jj bookmark ... built-in command.
Additional context
Since there is a straightforward-enough workaround by adding an alias, I don't know how crucial adding such a feature is. It is possible this might just be an alias (with necessary updates to above example alias to make it more general/friendly) added to the docs, possibly here: https://jj-vcs.github.io/jj/latest/bookmarks/#ease-of-use
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It might be nice for users to have a convenient way to move the "current branch" bookmark up (for workflows that are closer to git-like), rather than needing to manually specify the bookmark and the position to move to.
Describe the solution you'd like
jj bookmark fastforward
(name/options/... could easily be bikeshed, I am more so talking about the semantics) would take the one "obvious" bookmark, and move it to the one "obvious" revision. If there isn't an obvious one for either, then it should not do anything, and instead request the user to usejj bookmark move
.Regarding "obvious":
@
; possibly more restricted is to ensure it satisfiespush-bookmark-prefix
. I'm not sure how restricted we'd like this (possibly configurable by options)?@
is pretty obvious, but we also probably don't want to use@
if it is an entirely empty commmit, in which case we probably want to use@-
Describe alternatives you've considered
I am currently using this alias:
which works fine for my use case, but obviously it only works for people who share my name 🙃 It is possible I am not even using the ideal/fastest/optimal/... revsets here, but at least all the time that I've used it so far, it has not failed me (although I haven't used it particularly long). However, I suspect that this particular operation is common enough that it might be something to consider being a
jj bookmark ...
built-in command.Additional context
Since there is a straightforward-enough workaround by adding an alias, I don't know how crucial adding such a feature is. It is possible this might just be an alias (with necessary updates to above example alias to make it more general/friendly) added to the docs, possibly here: https://jj-vcs.github.io/jj/latest/bookmarks/#ease-of-use
The text was updated successfully, but these errors were encountered: