-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: jj duplicate -d
#3518
Comments
Another option is to add |
It also means we won't have to reimplement |
If you have Personally I think BTW. When using |
If adding a useful flag to For which my answer was always is that there should be one command doing one thing and convenient/discoverable alternatives should be default aliases or something.
fyi in clap |
My own conclusion is that if the command is logically different to the user, then it should be exposed via a different command, even if it accepts all the same arguments and/or is backed by the same implementation. My test is: if you were looking through the subcommand list to try to copy commits, would you have seen The logic would also apply to
I could see an argument for also adding a helper flag like |
I agree. My use case is cherry-picking (or FWIW, the current |
Wanted to reproduce @yuja's Discord comment:
I concurred and mentioned how it might be useful:
|
If we add I can work on a PR for this. |
That's a good question. The main problem is that it would probably violate the expectations of Git and Mercurial users when they don't pass
|
I have just revisited the UI for duplicate / rebase in jj-fzf (due to #4) and came to the conclusion that ideally there would be a a) Users most often want Git-like cherry-pick, which means: b) Power users might try rebasing an entire branch, work on it and throw it away: I.e. both cases usually involve a rebase immediately after (if someone knows of a different usecase, please tell). So the whole task could be (majorly) simplified if there simply was a As far as I am concerned, I just saw that jj HEAD now has (unreleased) duplicate |
[not a strong opinion] I don't think I necessarily want to rebase immediately afterwards. In particular, stuff might not compile/work on the latest trunk, so I don't always want to start integrating immediately. I could imagine a use-case where I'm doing a mega-merge workflow and want to duplicate a mega-merge so that I can do work + mess with the topology while being able to go back to the old version easily (or have both, in case I want to switch back and forth for some reason). But I won't say it should be a top use-case since I haven't actually done it in practice.
You mean that |
Is your feature request related to a problem? Please describe.
I wanted to backport a revset to a branch. I'm a noob, I'm aware of
jj rebase -s x -d f
and seemed like the perfect way to do it, if only it could ... duplicated thex
. There isjj duplicate
but it can't-d
.Describe the solution you'd like
jj duplicate -s x -d f
Describe alternatives you've considered
I did
jj duplicate x
, thenjj rebase -s y -d f
, but that clumsy because now I need to figure outy
from the output of first command, and it was unclear does it print it top down, or bottom up.The text was updated successfully, but these errors were encountered: