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
addPatterns silently drops all patterns after a line longer than 64KB #28
addPatterns reads the ignore file with bufio.NewScanner and never calls scanner.Buffer() or checks scanner.Err() (gitignore.go:440 on main). bufio.Scanner caps tokens at bufio.MaxScanTokenSize (64KB) by default; when a line exceeds that, Scan() returns false with bufio.ErrTooLong and the loop exits. Every pattern after the long line is silently discarded, so Match disagrees with git check-ignore for the remainder of the file and nothing is recorded in Errors().
Fix is either to raise the buffer (scanner.Buffer(nil, maxLine)) so the long line is parsed like git does, or keep the cap and record scanner.Err() in m.errors so the truncation is visible. The former keeps parity with git; the latter at least surfaces the divergence.
Activity