summaryrefslogtreecommitdiff
path: root/Command/Copy.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-07-03 13:55:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-07-03 13:55:50 -0400
commit104faaf5f5f958b449d79a923cf8b0ce095a0205 (patch)
tree788d417c8a3e7b8b2f8203268a52c2eb6494ebc2 /Command/Copy.hs
parente5eeb401d1743372102ec4064b6f87453fdc8597 (diff)
--all for get, move, and copy
Diffstat (limited to 'Command/Copy.hs')
-rw-r--r--Command/Copy.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/Command/Copy.hs b/Command/Copy.hs
index 75b91c85c..979eead65 100644
--- a/Command/Copy.hs
+++ b/Command/Copy.hs
@@ -14,13 +14,16 @@ import qualified Remote
import Annex.Wanted
def :: [Command]
-def = [withOptions Command.Move.options $ command "copy" paramPaths seek
+def = [withOptions Command.Move.moveOptions $ command "copy" paramPaths seek
SectionCommon "copy content of files to/from another repository"]
seek :: [CommandSeek]
-seek = [withField Command.Move.toOption Remote.byNameWithUUID $ \to ->
- withField Command.Move.fromOption Remote.byNameWithUUID $ \from ->
- withFilesInGit $ whenAnnexed $ start to from]
+seek =
+ [ withField Command.Move.toOption Remote.byNameWithUUID $ \to ->
+ withField Command.Move.fromOption Remote.byNameWithUUID $ \from ->
+ withAll (Command.Move.startAll to from False) $
+ withFilesInGit $ whenAnnexed $ start to from
+ ]
{- A copy is just a move that does not delete the source file.
- However, --auto mode avoids unnecessary copies, and avoids getting or
@@ -33,4 +36,3 @@ start to from file (key, backend) = stopUnless shouldCopy $
check = case to of
Nothing -> wantGet False (Just file)
Just r -> wantSend False (Just file) (Remote.uuid r)
-