-
Notifications
You must be signed in to change notification settings - Fork 346
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
simplify-parents: add a command to remove redundant parents #4492
Conversation
5afef51
to
64b1532
Compare
64b1532
to
fb4d0c4
Compare
I don't want to approve this change myself because I've not followed closely enough the discussions to know the policy about adding new commands. In particular, is "simplify" clear enough, or should it be "simplify-tree", or whatever? But I would have had a use for it as recently as today, when one of my PR (change A) was merged into In this case it was only one subtree with only two parents, and a simple operation, but with a more complex development tree I can see how it would have been even more useful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In particular, is "simplify" clear enough, or should it be "simplify-tree", or whatever?
I don't have a good suggestion, but I feel "simplify" is too generic. If we use "simplify-", "simplify-parents" is probably better.
Done, changed to simplify-parents for now. Idk if the file should still be named 'simplify.rs' to leave room for others, but I changed it to simplify_parents.rs also for now |
fb4d0c4
to
f3a0658
Compare
|
f3a0658
to
f7e88ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the commit message still contains simplify
instead of simplify-parents
f7e88ba
to
bfba609
Compare
Find and replace, my greatest weakness |
Yeah. If we had a generic graph reshaping command or command namespace, @ilyagr any thoughts? |
bfba609
to
d7ac8e8
Compare
I think One alternative I can think of is to have a subcommand, e.g. Yet another option would be to make Another command that could go into this namespace (or be an option to rebase) is |
I like the idea of |
Operation history is also a "graph", so I think
It might make sense, but I tend to prefer flattened command structure. |
If we add a |
This is a good point.
I wouldn't mind On the other hand, if we just want the uncommon commands to be in a subcommand, it could be Another idea, based on Yuya's comment is |
3c9933c
to
3ab5439
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, here are a few bikesheddy comments. I hope they are uncontroversial, but I thought I'd send them out early in just in case there are other opinions.
By the way, I agree with this approach of dealing with redundant ancestry overall. It seems more predictable to me than trying to do simplification automatically in some situations. (Well, I suppose, if we have some great ideas about auto-simplification, this PR doesn't prevent us trying to do that too, but I'm not optimistic about that at the moment). |
0d396cc
to
8603641
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all LGTM. The new clippy warning should be easy to fix. Thank you!
Would it be a good idea to set a default revset + configuration for |
Checklist
If applicable:
CHANGELOG.md