Make a leading **/ in an exclude pattern match at the top level #335

Merged
clawbot merged 1 commits from issue-303-doublestar-top-level into next 2026-10-13 13:50:12 +02:00
1 Commits
Author SHA1 Message Date
sneak fac81d1c7a Make a leading **/ in an exclude pattern match at the top level (closes #303)
check / check (push) Canceled after 0s
An unanchored exclude pattern such as **/node_modules or **/*.pyc
needed a / before the name, so it excluded sub/node_modules and
sub/y.pyc but backed up node_modules/ and x.pyc directly under the
snapshot path. An unanchored pattern already matches at every depth,
so the leading **/ is now dropped when the pattern is compiled and,
as in gitignore, the pattern matches the top level too.

Judgement call: an anchored /**/x is left as it was; the issue covers
patterns that start with **/.

Model: opus-5-5
2026-10-13 11:17:12 +00:00