Expand description
Lexical path normalization.
What:
Lexical path normalization, the way Node’s path.resolve does it.
Why:
git cli-git doctor scans each hooks directory once, so one directory named two ways (./hooks, hooks/,
a/../hooks) must compare equal without touching the file system.
In TS you’d write (pseudocode):
path.resolve(path);Functions§
- normalized_
path - What:
Normalize a path lexically: drop
., fold..into the component before it, never above the root. Why:PathBuf::joinkeeps.and.., and a..above the root stays at the root, as Node clamps it.