Skip to content
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

list: doesn't ignore gitignored files #6122

Open
shcheklein opened this issue Jun 7, 2021 · 0 comments
Open

list: doesn't ignore gitignored files #6122

shcheklein opened this issue Jun 7, 2021 · 0 comments
Labels
A: status Related to the dvc diff/list/status product: VSCode Integration with VSCode extension

Comments

@shcheklein
Copy link
Member

Bug Report

Description

dvc list -R . . lists .env even if it is part of the .gitignore

It's related to #5712, and we should understand what do we expect. But it's a bug from the current implementation perpective.

Reproduce

mkdir test-list-gitignore
cd test-list-gitignore
git init
virtualenv -p python3 .env
source .env/bin/activate
pip install -e "../dvc[all]"
echo ".env" >> .gitignore
git add .gitignore
git commit ".gitignore" -m "update .gitignore"
dvc list -R . .

Returns:

...
.env/share/doc/networkx-2.5.1/examples/graph/__pycache__/plot_roget.cpython-38.pyc
.env/share/doc/networkx-2.5.1/examples/graph/__pycache__/plot_words.cpython-38.pyc
.env/share/doc/networkx-2.5.1/examples/graph/dot_atlas.py
.env/share/doc/networkx-2.5.1/examples/graph/plot_degree_sequence.py
.env/share/doc/networkx-2.5.1/examples/graph/plot_erdos_renyi.py
.env/share/doc/networkx-2.5.1/examples/graph/plot_expected_degree_sequence.py
.env/share/doc/networkx-2.5.1/examples/graph/plot_football.py
.env/share/doc/networkx-2.5.1/examples/graph/plot_karate_club.py
.env/share/doc/networkx-2.5.1/examples/graph/plot_napoleon_russian_campaign.py
.env/share/doc/networkx-2.5.1/examples/graph/plot_roget.py
.env/share/doc/networkx-2.5.1/examples/graph/plot_words.py
.env/share/doc/networkx-2.5.1/examples/graph/roget_dat.txt.gz
.env/share/doc/networkx-2.5.1/examples/graph/words_dat.txt.gz
.env/share/doc/networkx-2.5.1/examples/javascript/README.txt
.env/share/doc/networkx-2.5.1/examples/javascript/__pycache__/force.cpython-38.pyc
.env/share/doc/networkx-2.5.1/examples/javascript/force.py
...

Expected

Probably no .env (it's very inefficient) and probably breaks the current logic?

But it also should be specified as part of the #5712

Environment information

DVC version: 2.3.0+ed2a0b
---------------------------------
Platform: Python 3.8.9 on macOS-10.15.6-x86_64-i386-64bit
Supports: All remotes
@dberenbaum dberenbaum added the product: VSCode Integration with VSCode extension label Jun 7, 2021
@daavoo daavoo added the A: status Related to the dvc diff/list/status label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: status Related to the dvc diff/list/status product: VSCode Integration with VSCode extension
Projects
None yet
Development

No branches or pull requests

3 participants