summaryrefslogtreecommitdiff
path: root/Command/Get.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-08 16:06:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-08 16:06:56 -0400
commit84a60358dfca930409622732aa023e6e00322319 (patch)
treefc9e8d53a5180ee67bb01ac6872b445f8cd55357 /Command/Get.hs
parent98612f75ffee93be2973fd444948314dd1b7f822 (diff)
make copy --to check preferred content of the remote
Diffstat (limited to 'Command/Get.hs')
-rw-r--r--Command/Get.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/Get.hs b/Command/Get.hs
index ab0e60b41..10b74bfc7 100644
--- a/Command/Get.hs
+++ b/Command/Get.hs
@@ -13,6 +13,7 @@ import qualified Remote
import Annex.Content
import qualified Command.Move
import Logs.Transfer
+import Annex.Wanted
def :: [Command]
def = [withOptions [Command.Move.fromOption] $ command "get" paramPaths seek
@@ -23,7 +24,7 @@ seek = [withField Command.Move.fromOption Remote.byName $ \from ->
withFilesInGit $ whenAnnexed $ start from]
start :: Maybe Remote -> FilePath -> (Key, Backend) -> CommandStart
-start from file (key, _) = stopUnless (not <$> inAnnex key) $
+start from file (key, _) = stopUnless (checkAuto $ shouldGet file key) $
autoCopies file key (<) $
case from of
Nothing -> go $ perform key file