-
Notifications
You must be signed in to change notification settings - Fork 433
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
Omit or disallow merge parents to be ancestors #3565
Comments
We actually did that simplification until recently: commits 3f1d75f, a898847, and e14ee8b. As I mentioned in the second of those commits, this was a bit of an experiment and we might roll it back. So thanks for your input. I feel pretty strongly that auto-rebasing should not simplify ancestor merges, however (i.e., I don't think we should roll back the first of those commits). |
(I'm not against changing the rebase command behavior or adding
I don't think redundant parents should be silently omitted here because it would be confusing if |
I guess I don't have a strong opinion about the default rebase behavior, but I'd like a flag or a config option to turn on simplification. For |
Description
It doesn't make logical sense to me to have a commit with two parents that have an ancestral relationship. The ancestor is redundant and should probably be omitted.
I experienced this when I had two local branches from upstream and a local merge of them. One of the branches got accepted upstream. When I rebased, my second branch got rebased onto my first, and my local merge got rebased onto both of them, meaning that it had two parents that were ancestor and descendant. I expected the ancestral commit to be omitted from the merge during the rebase.
I checked with
git
andhg
; neither of them allow merging with an ancestral commit.Steps to Reproduce the Problem
Expected Behavior
Merge commit does not have a parent that is an ancestor of another parent, either by error or omission.
Actual Behavior
New commit has both parents.
Specifications
The text was updated successfully, but these errors were encountered: