-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Negation "!" in .dvcignore doesn't unignore #10122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Eve-ning I think dvcignore feature ie the patterns is working fine, the bug is in
It looks like this is the expected behaviour of check-ignore. this is the test for the behaviour. @dberenbaum Do you think this test is correct, or am I missing something here? Tagging you since the last activity on this ticket was yours. |
Yes, I think that is correct. It looks related to a previous issue in #5046. DVC uses both of these methods and they don't seem to always be consistent: Lines 395 to 409 in 9b5772f
Lines 411 to 424 in 9b5772f
|
For
Following outputs differ - dvc-demo-2 on master [!?] via 🐍 v3.11.4 (.venv)
❯ git check-ignore data/*
data/data1
data/to_ignore.txt
dvc-demo-2 on master [!?] via 🐍 v3.11.4 (.venv)
❯ dvc check-ignore data/*
== I am LOCAL DVC ==
data/data1
data/to_ignore-NOT.txt
data/to_ignore.txt @dberenbaum This definitely seems like a bug. I believe the test cases are wrong and needs to be updated. Can the team confirm? |
@anunayasri good catch. Yes, I think DVC check-ignore should behave the same way as
only test case, or the implementation as well? |
@shcheklein Of course, we have to update both the test case and the implementation. By test case I meant that the expected behaviour is misaligned. |
Bug Report
Issue name
Negation "!", commonly used in
.gitignore
to "unignore" files, doesn't work in DVC.Description
Given 2 files:
ignore.txt
no-ignore.txt
We can git ignore them using this
.gitignore
fileHowever, in DVC, it doesn't "unignore".
Reproduce
Output shown in comments
Expected
Ideally, both
check-ignores
should be the sameEnvironment information
Output of
dvc doctor
:Additional Information (if any):
The text was updated successfully, but these errors were encountered: