diff --git a/Command/Get.hs b/Command/Get.hs index 1d46704b21..95d1b9007b 100644 --- a/Command/Get.hs +++ b/Command/Get.hs @@ -70,7 +70,7 @@ startKeys from (key, ai) = checkFailedTransferDirection ai Download $ start' :: Annex Bool -> Maybe Remote -> Key -> AssociatedFile -> ActionItem -> CommandStart start' expensivecheck from key afile ai = - stopUnless (not <$> inAnnex key) $ stopUnless expensivecheck $ + stopUnless expensivecheck $ case from of Nothing -> go $ perform key afile Just src -> diff --git a/Command/Mirror.hs b/Command/Mirror.hs index 022ea82ca0..62f5203ba0 100644 --- a/Command/Mirror.hs +++ b/Command/Mirror.hs @@ -75,7 +75,10 @@ startKey o afile (key, ai) = case fromToOptions o of haskey <- flip Remote.hasKey key =<< getParsed r case haskey of Left _ -> stop - Right True -> Command.Get.start' (return True) Nothing key afile ai + Right True -> ifM (inAnnex key) + ( stop + , Command.Get.start' (return True) Nothing key afile ai + ) Right False -> ifM (inAnnex key) ( do numcopies <- getnumcopies diff --git a/doc/todo/precache_logs_for_speed_with_cat-file_--buffer.mdwn b/doc/todo/precache_logs_for_speed_with_cat-file_--buffer.mdwn index d0cd632d8a..127e7e7174 100644 --- a/doc/todo/precache_logs_for_speed_with_cat-file_--buffer.mdwn +++ b/doc/todo/precache_logs_for_speed_with_cat-file_--buffer.mdwn @@ -37,10 +37,6 @@ and precache them. > > > Still todo: > > > > > > * move, copy, drop, and mirror were left not using the location log caching yet -> > > * get is left with an unncessary inAnnex check so could be sped up -> > > a little bit more. Above improvements to batch mode would allow -> > > fixing this. -> > > Another thing that the same cat-file --buffer approach could be used with is to cat the annex links. Git.LsFiles.inRepoDetails provides the Sha