diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-15 16:24:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-15 16:24:47 -0400 |
commit | 456b45b9b3982d9440a43ec014635dee15066f0e (patch) | |
tree | 18760407864d501595b0cf89de00c755a0105931 /Command/Copy.hs | |
parent | d036cd590f5c3c4edcd025effcf57c3d16886559 (diff) |
move annex.numcopies parsing into withNumCopies
Diffstat (limited to 'Command/Copy.hs')
-rw-r--r-- | Command/Copy.hs | 7 |
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 |