This prevents issues when a diff converts a file/directory/symlink into one of the other types without changing its name.
Eg. The SFTP adapter is being used. A diff simultaneously deletes a directory and creates a normal file with the same name as the old directory. If the deletion is not handled first, the SFTP attempt to create the new file will fail, because a directory with the same name already exists.
This prevents issues when a diff converts a file/directory/symlink into one of the other types without changing its name.
Eg. The SFTP adapter is being used. A diff simultaneously deletes a directory and creates a normal file with the same name as the old directory. If the deletion is not handled first, the SFTP attempt to create the new file will fail, because a directory with the same name already exists.