prevent exporttree=yes on remotes that don't support exports
Don't allow "exporttree=yes" to be set when the special remote does not support exports. That would be confusing since the user would set up a special remote for exports, but `git annex export` to it would later fail. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
45d30820ac
commit
16eb2f976c
23 changed files with 186 additions and 145 deletions
|
@ -34,14 +34,15 @@ import Control.Concurrent
|
|||
import Control.Concurrent.STM
|
||||
|
||||
remote :: RemoteType
|
||||
remote = RemoteType {
|
||||
typename = "p2p",
|
||||
remote = RemoteType
|
||||
{ typename = "p2p"
|
||||
-- Remote.Git takes care of enumerating P2P remotes,
|
||||
-- and will call chainGen on them.
|
||||
enumerate = const (return []),
|
||||
generate = \_ _ _ _ -> return Nothing,
|
||||
setup = error "P2P remotes are set up using git-annex p2p"
|
||||
}
|
||||
, enumerate = const (return [])
|
||||
, generate = \_ _ _ _ -> return Nothing
|
||||
, setup = error "P2P remotes are set up using git-annex p2p"
|
||||
, exportSupported = exportUnsupported
|
||||
}
|
||||
|
||||
chainGen :: P2PAddress -> Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex (Maybe Remote)
|
||||
chainGen addr r u c gc = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue