diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 6d98682727..329dafa034 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -615,4 +615,3 @@ def _reset(self): self.__dict__.pop("graph", None) self.__dict__.pop("stages", None) self.__dict__.pop("pipelines", None) - self.tree.__dict__.pop("dvcignore", None) diff --git a/tests/func/test_tree.py b/tests/func/test_tree.py index ad09e5312f..a53a515a2e 100644 --- a/tests/func/test_tree.py +++ b/tests/func/test_tree.py @@ -258,6 +258,7 @@ def test_walk_dont_ignore_subrepos(tmp_dir, scm, dvc): scm.commit("Add subrepo") dvc_tree = dvc.tree + dvc_tree.__dict__.pop("dvcignore") scm_tree = scm.get_tree("HEAD", use_dvcignore=True) path = os.fspath(tmp_dir) get_dirs = itemgetter(1)