worktree push: remove existing version id optimization for file outs

This commit is contained in:
Peter Rowlands
2023-01-10 16:21:31 +09:00
committed by Peter Rowlands (변기호)
parent d3d429ef7f
commit c94d28594d
-6
View File
@@ -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.
@@ -56,10 +55,6 @@ def worktree_view(
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(
@@ -108,7 +103,6 @@ def push_worktree(
repo.index,
push=True,
targets=targets,
latest_only=remote.worktree,
**kwargs,
)
new_index = view.data["repo"]