diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-13 14:41:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-13 14:41:10 -0400 |
commit | fa7934c035ff09b46d646353683c6d9745f0c94d (patch) | |
tree | ccdbbe618762679e9bc2932e8d92bbee86067fd9 /Config.hs | |
parent | 2d9784fae4ea1830865bc77de1a1c4c1b4ce3714 (diff) |
add GETAVAILABILITY to external special remote protocol
And some reworking of types, and added an annex-availability git config
setting.
Diffstat (limited to 'Config.hs')
-rw-r--r-- | Config.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,6 +1,6 @@ {- Git configuration - - - Copyright 2011-2012 Joey Hess <joey@kitenet.net> + - Copyright 2011-2014 Joey Hess <joey@kitenet.net> - - Licensed under the GNU GPL version 3 or higher. -} @@ -13,6 +13,7 @@ import qualified Git.Config import qualified Git.Command import qualified Annex import Config.Cost +import Types.Availability type UnqualifiedConfigKey = String data ConfigKey = ConfigKey String @@ -65,6 +66,9 @@ remoteCost' c = case remoteAnnexCostCommand c of setRemoteCost :: Git.Repo -> Cost -> Annex () setRemoteCost r c = setConfig (remoteConfig r "cost") (show c) +setRemoteAvailability :: Git.Repo -> Availability -> Annex () +setRemoteAvailability r c = setConfig (remoteConfig r "availability") (show c) + getNumCopies :: Maybe Int -> Annex Int getNumCopies (Just v) = return v getNumCopies Nothing = annexNumCopies <$> Annex.getGitConfig |