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
Slashes inside gitignore bracket expressions split the pattern incorrectly #177
The slash is inside a bracket expression, so it must not split the expression into two path segments. Git still treats the raw slash as making this rule relative to the ignore file's directory: dir/a.txt must not match this rule. A bracket must never consume an actual path separator either.
Both gitignore pattern factories currently split the original pattern at every /, before translating brackets. This also affects negated brackets and directory-only rules containing such a bracket.
This is distinct from #163, which prevented brackets from matching path separators, and #170, which handled escaped separators between segments. I have a fix with tests for bracket-aware splitting, anchoring, separator exclusion and optional-backend compatibility. No production incident is claimed.
Activity