You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ignore: prune unrelated subtrees for literal rooted includes #10958
Syncthing correctly includes projects/notes/file.txt, but also traverses the ignored projects/cache and movies trees.
Expected behavior
Keep the required ancestors traversable while pruning unrelated ignored branches.
Cause and proposed change
The matcher disables pruning upon encountering a nested include, before checking whether that pattern could match beneath the current directory.
For literal rooted includes, compare path-component prefixes to preserve traversal of ancestors and descendants while allowing unrelated branches to be skipped. Keep conservative behavior for wildcard, escaped, and unrooted patterns.
Reproduced on v2.1.7 and current upstream main. The new tests fail before the change and pass afterward. Affected suites, race detection, Go vet, and repository metadata checks pass.
Synthetic scanner benchmark with 1,000 unrelated trees, three alternating runs:
Metric
Before
After
Change
Visited entries
4,005
1,005
−74.9%
Median scan time
13.19 ms
2.80 ms
−78.7%
These are lab measurements, not whole-home rescan timings.
Activity