Skip to content

Commit

Permalink
worktree push: remove existing version id optimization for file outs
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla committed Jan 10, 2023
1 parent d3d429e commit c94d285
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions dvc/repo/worktree.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def worktree_view(
index: "Index",
targets: Optional["TargetType"] = None,
push: bool = False,
latest_only: bool = True,
**kwargs,
) -> "IndexView":
"""Return view of data that can be stored in worktree remotes.
Expand All @@ -56,10 +55,6 @@ def outs_filter(out: "Output") -> bool:
or (push and not out.can_push)
):
return False
# If we are not enforcing push to latest version and have a version
# for this out, we assume it still exists and can skip pushing it
if push and not latest_only and out.meta.version_id is not None:
return False
return True

return index.targets_view(
Expand Down Expand Up @@ -108,7 +103,6 @@ def push_worktree(
repo.index,
push=True,
targets=targets,
latest_only=remote.worktree,
**kwargs,
)
new_index = view.data["repo"]
Expand Down

0 comments on commit c94d285

Please sign in to comment.