summaryrefslogtreecommitdiff
path: root/Command/Copy.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Copy.hs')
-rw-r--r--Command/Copy.hs15
1 files changed, 8 insertions, 7 deletions
diff --git a/Command/Copy.hs b/Command/Copy.hs
index 9fd97334a..fd16cea29 100644
--- a/Command/Copy.hs
+++ b/Command/Copy.hs
@@ -18,13 +18,14 @@ def :: [Command]
def = [withOptions Command.Move.moveOptions $ command "copy" paramPaths seek
SectionCommon "copy content of files to/from another repository"]
-seek :: [CommandSeek]
-seek =
- [ withField toOption Remote.byNameWithUUID $ \to ->
- withField fromOption Remote.byNameWithUUID $ \from ->
- withKeyOptions (Command.Move.startKey to from False) $
- withFilesInGit $ whenAnnexed $ start to from
- ]
+seek :: CommandSeek
+seek ps = do
+ to <- getOptionField toOption Remote.byNameWithUUID
+ from <- getOptionField fromOption Remote.byNameWithUUID
+ withKeyOptions
+ (Command.Move.startKey to from False)
+ (withFilesInGit $ whenAnnexed $ start to from)
+ ps
{- A copy is just a move that does not delete the source file.
- However, --auto mode avoids unnecessary copies, and avoids getting or