Fix - Negation of rules#3894
Closed
tgandrews wants to merge 1 commit intolibgit2:masterfrom
tgandrews:dont-throw-away-negative-rules
Closed
Fix - Negation of rules#3894tgandrews wants to merge 1 commit intolibgit2:masterfrom tgandrews:dont-throw-away-negative-rules
tgandrews wants to merge 1 commit intolibgit2:masterfrom
tgandrews:dont-throw-away-negative-rules
Conversation
Currently negative rules are thrown away if they do not affect a rule before. This change adds a test which failed before but works now that we no longer throw away negative rules.
Author
|
I think the failing tests are wrong but have not removed them so that we can have a discussion. |
Member
|
No, the tests are actually correct in that they match the behavior of git.git. The following little hacky script tests this against upstream: |
Author
|
OK - I have clearly misunderstood this. The problem I am having is the scenario I have created the test for: A .gitignore containing Currently libgit2 says the child bar.txt is ignored but git does not. I guess this needs work. I will look further into it and re-open when resolved. |
Member
|
Well, you're actually correct with your observation that we fail to treat your case correctly. Created a new PR which should fix your issue. |
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.
Currently, negative rules are thrown away if they do not affect a rule before.
This change adds a test which failed before but works now that we no longer
throw away negative rules.
I have tried to prove this with tests but I think more are required to cover this.