diff --git a/dvc/output.py b/dvc/output.py index da31f1d88..a38af325b 100644 --- a/dvc/output.py +++ b/dvc/output.py @@ -577,6 +577,8 @@ class Output: if not dep.obj and dep.files: dep.obj = dep.get_obj() entry.obj = dep.obj + if not entry.hash_info and dep.obj: + entry.hash_info = dep.obj.hash_info return entry def changed_checksum(self): diff --git a/dvc/repo/index.py b/dvc/repo/index.py index a03171bc3..1374e0a68 100644 --- a/dvc/repo/index.py +++ b/dvc/repo/index.py @@ -466,7 +466,7 @@ class IndexView: workspace, key = out.index_key if filter_info and out.fs.path.isin(filter_info, out.fs_path): key = key + out.fs.path.relparts(filter_info, out.fs_path) - if out.meta.isdir: + if out.meta.isdir or out.stage.is_import and out.stage.deps[0].meta.isdir: prefixes[workspace].recursive.add(key) prefixes[workspace].explicit.update(key[:i] for i in range(len(key), 0, -1)) return prefixes