summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Branch.hs1
-rw-r--r--Annex/Content.hs8
-rw-r--r--Annex/Locations.hs10
-rw-r--r--Annex/SpecialRemote.hs2
4 files changed, 18 insertions, 3 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index 5482dc44b..5214df627 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -21,6 +21,7 @@ module Annex.Branch (
maybeChange,
commit,
forceCommit,
+ getBranch,
files,
withIndex,
performTransitions,
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 0001e8ac9..0b665d4dc 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -354,8 +354,12 @@ shouldVerify :: VerifyConfig -> Annex Bool
shouldVerify AlwaysVerify = return True
shouldVerify NoVerify = return False
shouldVerify DefaultVerify = annexVerify <$> Annex.getGitConfig
-shouldVerify (RemoteVerify r) = shouldVerify DefaultVerify
- <&&> pure (remoteAnnexVerify (Types.Remote.gitconfig r))
+shouldVerify (RemoteVerify r) =
+ (shouldVerify DefaultVerify
+ <&&> pure (remoteAnnexVerify (Types.Remote.gitconfig r)))
+ -- Export remotes are not key/value stores, so always verify
+ -- content from them even when verification is disabled.
+ <||> Types.Remote.isExportSupported r
{- Checks if there is enough free disk space to download a key
- to its temp file.
diff --git a/Annex/Locations.hs b/Annex/Locations.hs
index 47768b9c1..a5de2e4ff 100644
--- a/Annex/Locations.hs
+++ b/Annex/Locations.hs
@@ -36,6 +36,7 @@ module Annex.Locations (
gitAnnexFsckDbDir,
gitAnnexFsckDbLock,
gitAnnexFsckResultsLog,
+ gitAnnexExportDbDir,
gitAnnexScheduleState,
gitAnnexTransferDir,
gitAnnexCredsDir,
@@ -290,6 +291,15 @@ gitAnnexFsckDbLock u r = gitAnnexFsckDir u r </> "fsck.lck"
gitAnnexFsckResultsLog :: UUID -> Git.Repo -> FilePath
gitAnnexFsckResultsLog u r = gitAnnexDir r </> "fsckresults" </> fromUUID u
+{- .git/annex/export/uuid/ is used to store information about
+ - exports to special remotes. -}
+gitAnnexExportDir :: UUID -> Git.Repo -> FilePath
+gitAnnexExportDir u r = gitAnnexDir r </> "export" </> fromUUID u
+
+{- Directory containing database used to record export info. -}
+gitAnnexExportDbDir :: UUID -> Git.Repo -> FilePath
+gitAnnexExportDbDir u r = gitAnnexExportDir u r </> "db"
+
{- .git/annex/schedulestate is used to store information about when
- scheduled jobs were last run. -}
gitAnnexScheduleState :: Git.Repo -> FilePath
diff --git a/Annex/SpecialRemote.hs b/Annex/SpecialRemote.hs
index f53a2ca63..c215208db 100644
--- a/Annex/SpecialRemote.hs
+++ b/Annex/SpecialRemote.hs
@@ -81,7 +81,7 @@ autoEnable = do
(Just name, Right t) -> whenM (canenable u) $ do
showSideAction $ "Auto enabling special remote " ++ name
dummycfg <- liftIO dummyRemoteGitConfig
- res <- tryNonAsync $ setup t Enable (Just u) Nothing c dummycfg
+ res <- tryNonAsync $ setup t (Enable c) (Just u) Nothing c dummycfg
case res of
Left e -> warning (show e)
Right _ -> return ()