diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-08 16:06:56 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-08 16:06:56 -0400 |
commit | 84a60358dfca930409622732aa023e6e00322319 (patch) | |
tree | fc9e8d53a5180ee67bb01ac6872b445f8cd55357 /Command.hs | |
parent | 98612f75ffee93be2973fd444948314dd1b7f822 (diff) |
make copy --to check preferred content of the remote
Diffstat (limited to 'Command.hs')
-rw-r--r-- | Command.hs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Command.hs b/Command.hs index 55892225b..f2b95aa4c 100644 --- a/Command.hs +++ b/Command.hs @@ -38,10 +38,6 @@ import Usage as ReExported import Logs.Trust import Config import Annex.CheckAttr -import Logs.PreferredContent -import Git.FilePath - -import qualified Data.Set as S {- Generates a normal command -} command :: String -> String -> [CommandSeek] -> String -> Command @@ -127,12 +123,7 @@ autoCopies file key vs a = Annex.getState Annex.auto >>= go numcopiesattr <- numCopies file needed <- getNumCopies numcopiesattr (_, have) <- trustPartition UnTrusted =<< Remote.keyLocations key - if length have `vs` needed - then do - fp <- inRepo $ toTopFilePath file - ifM (isPreferredContent Nothing S.empty fp) - ( a, stop ) - else stop + if length have `vs` needed then a else stop autoCopiesWith :: FilePath -> Key -> (Int -> Int -> Bool) -> (Maybe Int -> CommandStart) -> CommandStart autoCopiesWith file key vs a = do |