Resolve "Cannot delete and upload file of the same name in the Web IDE"
What does this MR do?
Resolves #60859 (closed).
In more details it changes some things in the way we handle entries when those get deleted in Web IDE:
- when an entry gets deleted, this change gets staged right away. This is per original git design: when running
git rm MY_FILE
git stages the delete right away exactly to allow for adding new files with the same name - now we can add new entries to the same path
- when adding a new file of the same path as deleted one, it's marked with
replaces: true
but otherwise behaves as any other tempEntry and can be staged - once this tempEntry gets staged, it replaces original entry on the same path. But before that, the original entry gets added to
state.replacedFiles
for easier discarding the changes later - after tempEntry gets committed and hence replaces original entry in the repository, it gets
replaces: false
andstate.replacedFiles
gets emptied.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
Edited by Denys Mishunov