pub fn resolve_mount_src(source: &Utf8Path, src: &str) -> Utf8PathBufExpand description
Resolve a [[mount.entry]] src = "..." value to an absolute
path. ~ and ~/... expand to the home directory; absolute
inputs are returned verbatim (so a private clone at
~/.dotfiles-private/home mounts directly without symlinking).
Anything else is treated as relative to source (the dotfiles
repo root) — the historical default.
Implementation detail: Utf8PathBuf::join already replaces the
base with absolute arguments, so we just need expand_tilde
first to handle the ~ form.
If expand_tilde couldn’t resolve ~ (both HOME and
USERPROFILE unset), it returns the input verbatim — in that
case we MUST NOT rebase it under source, because
<source>/~/foo silently resolves to a wrong tree instead of
surfacing the unset-home configuration error. Return the
unresolved ~ form so the caller hits a clear “no such path”
later. (Caught in PR #56 review by coderabbitai.)