Web IDE uses the wrong parent when the file changes during editing
Steps to reproduce:
- Create a file.
- Open it in the web IDE.
- Make a change but don't commit it.
- Elsewhere, make a change to a different part of the file, on the same branch.
- Commit the change in the web IDE to a new branch.
Expected: the parent commit for the web IDE commit is the one from step 2.
Actual: it's from step 4. And that means that I've overwritten someone else's changes unintentionally. This happens a lot on our team.yml file in www-gitlab-com.
Here's an example commit showing that: issue-reproduce/web-edit-tests@44c62fbf
The web editor has the same issue, but it does show a flash message if the parent SHA changes. Unfortunately, that message is very easy to ignore: