-
Notifications
You must be signed in to change notification settings - Fork 534
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
Generate revertibles for commits incoming from a merge #22644
Conversation
⯅ @fluid-example/bundle-size-tests: +345 Bytes
Baseline commit: 5575b1e |
|
||
Branch merges generate revertibles | ||
|
||
Merging any number of commits into a target branch (via the 'merge' method) now generates a revertible for each commit on the target branch. |
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.
Does this include a revertible for the merge commit itself, or just the commits that made up the merged branch?
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.
Good question. There is no such thing as a merge commit, at least not as a primitive. Merge simply applies all the divergent changes of one branch to another branch (after rebasing them). The git-style "squash merge commit" is accomplished by the user running the merge inside of a transaction (because the transaction will squash all the commits that came in from the other branch). I expect that's going to be a pretty common pattern. Unfortunately we don't support it yet (you'll crash if you try) because there is some rebaser work that needs to be done first (I think it's in progress though!).
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.
Primarily reviewed the docs. Someone with a better understanding of the underlying logic should review too :)
Description
This corrects some behavior in the (currently alpha) branching APIs. Currently, merging one or more commits into a target branch from a source branch does not generate revertibles on the target branch. This PR updates it so that each merge commit fires a "commitApplied" event and generates the proper revertible.