path: extract sub-option logic into its own method...
path: extract sub-option logic into its own method
We will need to re-use this logic for `path://` so we first extract it into its own method.
Differential Revision:
https://phab.mercurial-scm.org/D10262