What if your child one day no longer wants your exes name though?
I have elder half siblings whose dad abused my mum and them too. Let's say the first family name was Jones, mum's maiden name Smith, my dad's name Thomas, then future partners etc.
So the family is:
Mum - first Smith, then Jones, then Smith, then Thomas.
Brother - Jones, then Smith.
Sister - Jones, then Smith, now Roberts with her husband, kids also Roberts. Also changed her first name from the one her dad gave her.
Sister 2 - Thomas, stayed Thomas on marriage, children are Howard.
Me - Thomas, and stayed Thomas on marriage, my children will be Thomas-Brown.
Four kids, four different ways of dealing with it. And only two with the same name as mum.
Obviously I grew up not feeling like names made a family as a result, but your child may well end up choosing different anyway. How old are they?