Skip to content

Commit

Permalink
update: disable rev/to-remote/no-download for worktrees
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla committed Dec 6, 2022
1 parent baeedea commit f5699ce
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dvc/repo/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ def update(
remote_obj = self.cloud.get_remote(name=remote)
if not remote_obj.worktree:
raise StageUpdateError(other_stage_infos[0].stage.relpath)
if rev:
raise InvalidArgumentError(
"--rev can't be used with worktree update"
)
if no_download:
raise InvalidArgumentError(
"--no-download can't be used with worktree update"
)
if to_remote:
raise InvalidArgumentError(
"--to-remote can't be used with worktree update"
)
update_worktree_stages(
self,
other_stage_infos,
Expand Down

0 comments on commit f5699ce

Please sign in to comment.