A few things:
.dvc and other ignored dirsdvc_walk() and walk_files() always walk the working dir, but might accept dvcignore built from a branch. The results will make no sense.We may approach this from two sides:
dvctree = TreeWithIgnores(some_tree); dvctree.walk(...).dvcignore built from working dir if we os.walk().when we collect stages in a branch dvcignore is not used at all, i.e. we go into .dvc and other ignored dirs
It is used https://github.com/iterative/dvc/blob/master/dvc/repo/__init__.py#L401 . Could you clarify?
Not used in GitTree.walk() https://github.com/iterative/dvc/blob/ee70822bd434adb36c41e20c63939af69bf0bc64/dvc/scm/git/tree.py#L139-L152
@Suor Good catch! CC @pared
@Suor, what do you mean by a tree?
@mroutis trees that we use. E.g. dvc/dvc/scm/git/tree.py
thanks, @efiop
Confirmed, dvcignore has not been properly working for branches since day 1.
https://github.com/iterative/dvc/pull/1820
Most helpful comment
Not used in
GitTree.walk()https://github.com/iterative/dvc/blob/ee70822bd434adb36c41e20c63939af69bf0bc64/dvc/scm/git/tree.py#L139-L152