diff options
Diffstat (limited to 'Command/Copy.hs')
-rw-r--r-- | Command/Copy.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Command/Copy.hs b/Command/Copy.hs index 77beb4b4f..d789d41f6 100644 --- a/Command/Copy.hs +++ b/Command/Copy.hs @@ -12,15 +12,15 @@ import Command import qualified Command.Move def :: [Command] -def = [dontCheck toOpt $ dontCheck fromOpt $ - command "copy" paramPaths seek +def = [withOptions Command.Move.options $ command "copy" paramPaths seek "copy content of files to/from another repository"] seek :: [CommandSeek] -seek = [withNumCopies $ \n -> whenAnnexed $ start n] +seek = [withField "to" id $ \to -> withField "from" id $ \from -> + withNumCopies $ \n -> whenAnnexed $ start to from n] -- A copy is just a move that does not delete the source file. -- However, --auto mode avoids unnecessary copies. -start :: Maybe Int -> FilePath -> (Key, Backend) -> CommandStart -start numcopies file (key, backend) = autoCopies key (<) numcopies $ - Command.Move.start False file (key, backend) +start :: Maybe String -> Maybe String -> Maybe Int -> FilePath -> (Key, Backend) -> CommandStart +start to from numcopies file (key, backend) = autoCopies key (<) numcopies $ + Command.Move.start to from False file (key, backend) |