aboutsummaryrefslogtreecommitdiff
path: root/Remote/BitTorrent.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-09-07 13:45:31 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-09-07 13:48:44 -0400
commitd910a94df7d6f5c87897c248586cb65523457f99 (patch)
tree692446ec624e63ac8fa4aec72f0b5ee8e5d13723 /Remote/BitTorrent.hs
parent7bd9a9cad8b413f4b09f9ab11a9d6d7ce72b8336 (diff)
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.
Diffstat (limited to 'Remote/BitTorrent.hs')
-rw-r--r--Remote/BitTorrent.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Remote/BitTorrent.hs b/Remote/BitTorrent.hs
index 9a1be1c0e..37594bd11 100644
--- a/Remote/BitTorrent.hs
+++ b/Remote/BitTorrent.hs
@@ -36,12 +36,13 @@ import qualified Data.ByteString.Lazy as B
#endif
remote :: RemoteType
-remote = RemoteType {
- typename = "bittorrent",
- enumerate = list,
- generate = gen,
- setup = error "not supported"
-}
+remote = RemoteType
+ { typename = "bittorrent"
+ , enumerate = list
+ , generate = gen
+ , setup = error "not supported"
+ , exportSupported = exportUnsupported
+ }
-- There is only one bittorrent remote, and it always exists.
list :: Bool -> Annex [Git.Repo]