Repository navigation
Preserve descendant restrictions in explicit trailing globstar patterns - #155
Closed
sricharanreddycheruku wants to merge 1 commit into
Closed
sricharanreddycheruku wants to merge 1 commit into
sricharanreddycheruku wants to merge 1 commit into
Conversation
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.
An explicit trailing // is currently normalized like an ordinary directory
pattern: folder// becomes a regex matching folder/ itself. As a result, the
parent and its immediate files are incorrectly ignored. Git leaves those paths
available and excludes only descendant directories and their contents.
Preserve whether the source pattern contains an explicit final **/ segment before
normalization. Require a descendant directory during translation, and avoid the
match-all shortcut when /*// carries this restriction. The explicit /*/
contents pattern also avoids the ordinary */ shortcut, which incorrectly matches
its parent directory. Keep ordinary folder/,
**/ and collapsed // behavior unchanged. Apply the correction to both
GitIgnoreBasicPattern and GitIgnoreSpecPattern without changing public signatures.
Validation:
byte patterns, newline directory names, compatibility shortcuts and all eight
backend/order configurations. Original source reports 42 failures, including
subtests, with ten passing compatibility controls.
passed on each; simple, RE2 and Hyperscan installed.
on real file trees. Expected parent/immediate-file behavior verified separately.
Update the README and change history. This translation fix is independent of the
prepared ancestor-resolution fix and passes on the current upstream base.