Document gitignore inputs that raise despite being accepted by Git - #148
Closed
rupayon123 wants to merge 1 commit into
Closed
rupayon123 wants to merge 1 commit into
rupayon123 wants to merge 1 commit into
Conversation
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document the
GitIgnorePatternErrorboundary on both supportedpattern_to_regexmethods: a bare!(including trailing unescaped spaces) and an unmatched trailing backslash raise rather than producing a no-op. Git accepts these lines without a diagnostic, so a caller cannot assume that a Git-readable ignore file is exception-free for pathspec.This addresses the documentation-only request in #146 and its follow-up, preserving runtime behavior and the existing exception contract. It does not overlap #143's proposed behavior change.
Validation:
git check-ignore --no-indexin an isolated repository.python -m unittest discover -t . -s tests/succeeds: 221 tests run, 379 skipped cases/subtests for unavailable optional backends/platform conditions.-aWEnqb html) passes; both API sections contain the new text and exception links.git diff --checkpasses. Optional native regex backends were not installed or tested.Prepared with OpenAI Codex assistance.