initial support for annexobjects=yes

Works but some commands may need changes to support special remotes
configured this way.
This commit is contained in:
Joey Hess 2024-08-02 14:07:45 -04:00
parent 169fd414eb
commit 28b29f63dc
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
14 changed files with 163 additions and 41 deletions

View file

@ -100,6 +100,12 @@ exportTree = fromMaybe False . getRemoteConfigValue exportTreeField
importTree :: ParsedRemoteConfig -> Bool
importTree = fromMaybe False . getRemoteConfigValue importTreeField
annexObjectsField :: RemoteConfigField
annexObjectsField = Accepted "annexobjects"
annexObjects :: ParsedRemoteConfig -> Bool
annexObjects = fromMaybe False . getRemoteConfigValue annexObjectsField
{- Parsers for fields that are common to all special remotes. -}
commonFieldParsers :: [RemoteConfigFieldParser]
commonFieldParsers =
@ -124,6 +130,8 @@ essentialFieldParsers =
(FieldDesc "export trees of files to this remote")
, yesNoParser importTreeField (Just False)
(FieldDesc "import trees of files from this remote")
, yesNoParser annexObjectsField (Just False)
(FieldDesc "store other objects in remote along with exported trees")
]
autoEnableFieldParser :: RemoteConfigFieldParser