implement exporttree=yes configuration
* Only export to remotes that were initialized to support it. * Prevent storing key/value on export remotes. * Prevent enabling exporttree=yes and encryption in the same remote. SetupStage Enable was changed to take the old RemoteConfig. This allowed only setting exporttree when initially setting up a remote, and not configuring it later after stuff might already be stored in the remote. Went with =yes rather than =true for consistency with other parts of git-annex. Changed docs accordingly. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
a4328b49d2
commit
28e2cad849
14 changed files with 69 additions and 29 deletions
|
@ -111,7 +111,7 @@ gitSetup Init mu _ c _ = do
|
|||
if isNothing mu || mu == Just u
|
||||
then return (c, u)
|
||||
else error "git remote did not have specified uuid"
|
||||
gitSetup Enable (Just u) _ c _ = do
|
||||
gitSetup (Enable _) (Just u) _ c _ = do
|
||||
inRepo $ Git.Command.run
|
||||
[ Param "remote"
|
||||
, Param "add"
|
||||
|
@ -119,7 +119,7 @@ gitSetup Enable (Just u) _ c _ = do
|
|||
, Param $ fromMaybe (giveup "no location") (M.lookup "location" c)
|
||||
]
|
||||
return (c, u)
|
||||
gitSetup Enable Nothing _ _ _ = error "unable to enable git remote with no specified uuid"
|
||||
gitSetup (Enable _) Nothing _ _ _ = error "unable to enable git remote with no specified uuid"
|
||||
|
||||
{- It's assumed to be cheap to read the config of non-URL remotes, so this is
|
||||
- done each time git-annex is run in a way that uses remotes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue