hg-core: remove useless code (D8958#inline-14988 followup)
Differential Revision: https://phab.mercurial-scm.org/D9099