import: Added --no-content option, which avoids downloading files from a special remote

Only supported by some special remotes: directory
I need to check the rest and they're currently missing methods until I do.

git-annex sync --no-content does not yet use this to do imports
This commit is contained in:
Joey Hess 2020-07-03 13:41:57 -04:00
parent a8099b9896
commit 85506a7015
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 204 additions and 60 deletions

View file

@ -276,6 +276,18 @@ data ImportActions a = ImportActions
-- May also find old versions of files that are still stored in the
-- remote.
{ listImportableContents :: a (Maybe (ImportableContents (ContentIdentifier, ByteSize)))
-- Imports a file from the remote, without downloading it,
-- by generating a Key (of any type).
--
-- May update the progress meter if it needs to perform an
-- expensive operation, such as hashing a local file.
--
-- Ensures that the key corresponds to the ContentIdentifier,
-- bearing in mind that the file on the remote may have changed
-- since the ContentIdentifier was generated.
--
-- Throws exception on failure.
, importKey :: Maybe (ExportLocation -> ContentIdentifier -> ByteSize -> MeterUpdate -> a Key)
-- Retrieves a file from the remote. Ensures that the file
-- it retrieves has the requested ContentIdentifier.
--