aboutsummaryrefslogtreecommitdiff
path: root/Command/Copy.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-15 16:24:47 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-15 16:24:47 -0400
commit456b45b9b3982d9440a43ec014635dee15066f0e (patch)
tree18760407864d501595b0cf89de00c755a0105931 /Command/Copy.hs
parentd036cd590f5c3c4edcd025effcf57c3d16886559 (diff)
move annex.numcopies parsing into withNumCopies
Diffstat (limited to 'Command/Copy.hs')
-rw-r--r--Command/Copy.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Command/Copy.hs b/Command/Copy.hs
index 125e0bb9f..d7625ccdb 100644
--- a/Command/Copy.hs
+++ b/Command/Copy.hs
@@ -9,7 +9,6 @@ module Command.Copy where
import Command
import qualified Command.Move
-import Utility
command :: [Command]
command = [repoCommand "copy" paramPaths seek
@@ -20,9 +19,7 @@ seek = [withNumCopies start]
-- A copy is just a move that does not delete the source file.
-- However, --auto mode avoids unnecessary copies.
-start :: CommandStartAttrFile
-start (file, attr) = isAnnexed file $ \(key, _) ->
+start :: FilePath -> Maybe Int -> CommandStart
+start file numcopies = isAnnexed file $ \(key, _) ->
autoCopies key (<) numcopies $
Command.Move.start False file
- where
- numcopies = readMaybe attr