WebIDE: Incorrect diff of deletion and addition of the same file
Summary
In Web IDE, if you delete a file, and then add a new file by the same name, and stage everything, the diff shown is incorrect. It shows that you added a new file, but the deletion of old file is nowhere to be found in the diff.
Case 1. New file added with content different from the old file
Steps
- Delete an existing file, lets say
README.md
. - Add a new file with the same name:
README.md
. - Add some content to that file, say
hello world
. - Stage all changes.
Case 2. New file added with the same content as the old file
Steps
- Copy the contents of a file, say
README.md
. - Delete the file.
- Add a new file with the same name:
README.md
. - Paste the contents you copied earlier in Step 1.
- Stage all changes.
In contrast with the above differences, the following case works just fine:
Case 3. Rename a file to another name, and then rename it back to its original name.
Steps
- Rename a file, say
README.md
toREADME2.md
. - Stage all changes.
- Rename the file back to its original name (
README2.md
toREADME.md
).
Result
There is no staged diff of README.md
, so the commit tab is not visible at all.
Edited by Himanshu Kapoor