split off versionedExport from appendonly

S3 uses versionedExport, while GitLFS uses appendonly.

This is groundwork for later changes.
This commit is contained in:
Joey Hess 2020-12-28 14:37:15 -04:00
parent fe4725d66e
commit 46059ab0e5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 41 additions and 26 deletions

View file

@ -362,10 +362,10 @@ cleanupUnexport r db eks loc = do
removeExportedLocation db (asKey ek) loc
flushDbQueue db
-- An appendonly remote can support removeExportLocation to remove
-- the file from the exported tree, but still retain the content
-- and allow retrieving it.
unless (appendonly r) $ do
-- An versionedExport remote supports removeExportLocation to remove
-- the file from the exported tree, but still retains the content
-- and allows retrieving it.
unless (versionedExport (exportActions r)) $ do
remaininglocs <- liftIO $
concat <$> forM eks (\ek -> getExportedLocation db (asKey ek))
when (null remaininglocs) $