Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Prevent broken patches when staging or unstaging lines rapidly #1797
Description of the Change
To prevent the generation of broken patches, the
I've addressed this somewhat by waiting for the staging operation promise to resolve first before waiting for the "next patch" promise to resolve.
This one I fixed by comparing the actual
I thought about introducing a first-class way to sequence the operations performed within a
Rapidly staging and unstaging lines will no longer create bad patches.
Well, it might cause some merge conflicts in #1767.
I've tested this by manually reproducing the bug in dev mode, making the change, and verifying that it no longer appears.
We already do have unit tests that are intended to capture this sort of situation. It turns out that writing unit tests to catch asynchronous race conditions is tricky. Who knew!
User Experience Research