fn glob_walk_root(pattern: &Path) -> &PathExpand description
Given a glob pattern, walk up the path tree until we find a component
that contains no glob metacharacters (*, ?, [). The result is
a concrete directory (or .) suitable as a WalkDir root.
For example:
target/**/*.txt→target/target/release/foo-*→target/release/*.tar.gz→.