-
Notifications
You must be signed in to change notification settings - Fork 317
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: Allow jj squash
to span multiple commits.
#2678
Comments
If we don't make |
I suspect we shouldn't make
There's currently |
Absolutely, I meant to say --from. I would probably require all:, that's also a good point. In principle, we could make an exception for renders of the form A::B, but that seems a bit too complicated for the benefit. So, the above turns into something like
|
I don't think there should be a command called |
Yeah, that's totally fair. As both #2678 (comment) and #2678 (comment) hinted at, this shouldn't be the way forward. But recently there has been a discussion (#2882) to move |
Let’s leave The way it would work is up for debate. My idea is to identify the roots and the heads within the revset, associate each root with the set of heads that are descended from it, virtually merge each set of heads, and finally “collapse” the merged sets of heads down to their respective roots. In the final result only the roots of the revset remain, and their contents are of the virtual merges of their descendant heads; the descendants of the former heads of the revset are rebased onto the roots of it. In the simple case of a single linear descent, the result is intuitive. In other cases, maybe an |
This sounds a lot like what the proposed |
Why though? I think its in our complexity/novelty budget to give it new powers.
That sounds like
This really sounds like #170. |
Yes, but if I understand
No; let me try to explain. What What this FR suggests to do to a linear chain of commits of length What my understanding of The way I suggested that |
Probably not constructive to this conversation, but I was wanting to do this and I concocted this monstrocity: jj log -r master+..tzyrpmnw --template 'change_id ++ "\n"' --no-graph | xargs -I {} jj squash -r {} -m "Final commit message" Which will one-by-one squash all commits in a given range. Just dumping this here in case it is useful to anyone who stumbles across this issue. |
What I had in mind was actually not to limit it to a linear chain. I think it makes sense to move/squash any number of changes into a given destination. All the source revisions would become empty and abandoned. You could combine that with paths too, which means some of the source revisions might remain. Combining it with |
I don't think this will matter as there are way less Sapling users than Git, so we could adopt the name. It will only be confusing initially.
Yes, that seems to be a agreeable solution, although having the option to squash everything would be better.
Yes, thats also my understanding.
That's my favorite solution so far. It'd also make sense if we follow-through with #2882 . |
We've also discussed this already in Discord. Particularly useful if you need only a single patch for codereview.
Ideally this is can be implemented, when/if we make
squash
an alias formove
.Edit: The insightful Discussion around making
squash
an alias ofmove
starts here. It also proposes the feature forjj move
some messages below.The text was updated successfully, but these errors were encountered: