diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-03-25 17:06:14 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-03-25 17:06:14 -0400 |
commit | 850241b7fed075c8a0055ae77cb30d6485aaa795 (patch) | |
tree | bbae2d577ea7daf136cfb80cdf87e4ce76681f84 /Command/Get.hs | |
parent | 644cd4ca27e410ca567ec0f78acf2517d91d330e (diff) |
--auto is no longer a global option; only get, drop, and copy accept it.
Not a behavior change unless you were passing it to a command that ignored it.
Diffstat (limited to 'Command/Get.hs')
-rw-r--r-- | Command/Get.hs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Command/Get.hs b/Command/Get.hs index 85960fc1a..922aee06a 100644 --- a/Command/Get.hs +++ b/Command/Get.hs @@ -21,20 +21,23 @@ cmd = [withOptions getOptions $ command "get" paramPaths seek SectionCommon "make content of annexed files available"] getOptions :: [Option] -getOptions = fromOption : annexedMatchingOptions ++ keyOptions +getOptions = fromOption : annexedMatchingOptions ++ keyOptions ++ [autoOption] seek :: CommandSeek seek ps = do from <- getOptionField fromOption Remote.byNameWithUUID - withKeyOptions + auto <- getOptionFlag autoOption + withKeyOptions auto (startKeys from) - (withFilesInGit $ whenAnnexed $ start from) + (withFilesInGit $ whenAnnexed $ start auto from) ps -start :: Maybe Remote -> FilePath -> Key -> CommandStart -start from file key = start' expensivecheck from key (Just file) +start :: Bool -> Maybe Remote -> FilePath -> Key -> CommandStart +start auto from file key = start' expensivecheck from key (Just file) where - expensivecheck = checkAuto (numCopiesCheck file key (<) <||> wantGet False (Just key) (Just file)) + expensivecheck + | auto = numCopiesCheck file key (<) <||> wantGet False (Just key) (Just file) + | otherwise = return True startKeys :: Maybe Remote -> Key -> CommandStart startKeys from key = start' (return True) from key Nothing |