update: disable rev/to-remote/no-download for worktrees

This commit is contained in:
Peter Rowlands
2022-12-06 15:14:17 +09:00
committed by Peter Rowlands (변기호)
parent baeedead3a
commit f5699ce16b
+12
View File
@@ -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,