dirstate: factor the identity setting code in the dirstate map...
dirstate: factor the identity setting code in the dirstate map
We need it in more locations, so let us start factoring thing out first
to make sure the same code is called everywhere.
This bears some similarity with
85746485a4dd on default, but at a smaller
scope and for a different purpose.