Web IDE: After a file is deleted, re-added with another content and committed, the file is still marked as changed in the tree

Summary

After a file is deleted, re-added with another content and committed after all, the file is still marked as changed in the tree.

Steps to reproduce

  • In a project in Web IDE, delete a file from
  • Add a new file with the same name
  • Click "Commit" and stage your newly-added file: it will replace the already-staged one
  • Commit your change

After successfully committing your changes, the editor gets back to Edit view of the project with the new file in it, but the file is still marked as changed ("Unstaged addition" tooltip).

Example Project

staging.gitlab.com at the time of writing

What is the current bug behavior?

The new file that has replaced an old one is marked as changed even after the replacement has been committed.

What is the expected correct behavior?

After successfully committing the replacement file, the file should not be anyhow marked and should be a normal entry in the tree.

Output of checks

This bug happens at staging.gitlab.com at the time of writing