Make broken symlink depth robust under absolute paths
Before adoption: this commit came in with the history the project adopted, so no landing records it.
The depth for a broken symlink was derived by stripping the search root from its path and counting the remaining components. Compare the path and the roots in absolute form before stripping, so the match holds whether or not --absolute-path has already made the roots absolute, and pick the deepest matching root. This avoids an absolute path failing to match a relative root and falling back to an inflated depth. Add a regression test that exercises the broken symlink case together with --absolute-path.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+65 added−11 removed
- tests:+40 added−0 removed
- other:+25 added−11 removed