Skip to content

Commit f5699ce

Browse files
committed
update: disable rev/to-remote/no-download for worktrees
1 parent baeedea commit f5699ce

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dvc/repo/update.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ def update(
6464
remote_obj = self.cloud.get_remote(name=remote)
6565
if not remote_obj.worktree:
6666
raise StageUpdateError(other_stage_infos[0].stage.relpath)
67+
if rev:
68+
raise InvalidArgumentError(
69+
"--rev can't be used with worktree update"
70+
)
71+
if no_download:
72+
raise InvalidArgumentError(
73+
"--no-download can't be used with worktree update"
74+
)
75+
if to_remote:
76+
raise InvalidArgumentError(
77+
"--to-remote can't be used with worktree update"
78+
)
6779
update_worktree_stages(
6880
self,
6981
other_stage_infos,

0 commit comments

Comments
 (0)