Skip to content

Commit

Permalink
index: collect: keep meta/hash_info on push
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Oct 24, 2023
1 parent 7dc4df9 commit 7a3a02b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dvc_data/index/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def _collect_from_index(
prefix,
storage,
callback: "Callback" = DEFAULT_CALLBACK,
push: bool = False,
):
entries = {}

Expand All @@ -40,7 +41,8 @@ def _collect_from_index(
meta = entry.meta
hash_info = entry.hash_info
if (
isinstance(storage, FileStorage)
not push
and isinstance(storage, FileStorage)
and storage.fs.version_aware
and entry.meta
and not entry.meta.isdir
Expand Down Expand Up @@ -75,6 +77,7 @@ def collect( # noqa: C901
callback: "Callback" = DEFAULT_CALLBACK,
cache_index=None,
cache_key=None,
push: bool = False,
) -> List["DataIndex"]:
from fsspec.utils import tokenize

Expand Down Expand Up @@ -113,6 +116,7 @@ def collect( # noqa: C901
prefix,
data,
callback=callback,
push=push,
)
cache_index.commit()

Expand Down

0 comments on commit 7a3a02b

Please sign in to comment.