Skip to content

glob: match explicitly-named dotfiles and resolve literal paths through symlinks - #32853

Merged
Jarred-Sumner merged 8 commits into
mainfrom
claude/farm/38875b1f/glob-explicit-dot-and-symlink-literal
Jun 28, 2026
Merged

glob: match explicitly-named dotfiles and resolve literal paths through symlinks#32853
Jarred-Sumner merged 8 commits into
mainfrom
claude/farm/38875b1f/glob-explicit-dot-and-symlink-literal

glob: match explicitly-named dotfiles and resolve literal paths throu…

92fa0f7
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 27, 2026 in 17m 2s

Code review found 1 important issue

Found 5 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/glob/GlobWalker.rs:1658-1664 ** recursion leaks into hidden directory via Some(2) advance

Annotations

Check failure on line 1664 in src/glob/GlobWalker.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

** recursion leaks into hidden directory via Some(2) advance

When a hidden directory matches the segment after `**` and that segment is not the last component, `match_pattern_dir` returns `Some(2)` without a `hidden` guard, and `eval_dir` then re-adds the `**` index — so `**` keeps recursing *inside* a hidden directory it should never have traversed. With `dot:false`, pattern `**/.dotdir/inner.txt` over a tree containing `.dotdir/foo/.dotdir/inner.txt` now spuriously matches that path; bash/picomatch/minimatch/fast-glob all return nothing because `**` can