This method is called once a DirstateItem have been modified to apply the
change on the dirstatemap if necessary.
Each variant have a different implementation (which is … the point).
We use addfile for the rustmap and not set_dirstate_item because we need to
keep the internal counter up to date and set_dirstate_item does not do it.