From fa7934c035ff09b46d646353683c6d9745f0c94d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 13 Jan 2014 14:41:10 -0400 Subject: add GETAVAILABILITY to external special remote protocol And some reworking of types, and added an annex-availability git config setting. --- Config.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index 3c6f3faa1..5003c1ce0 100644 --- a/Config.hs +++ b/Config.hs @@ -1,6 +1,6 @@ {- Git configuration - - - Copyright 2011-2012 Joey Hess + - Copyright 2011-2014 Joey Hess - - 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 -- cgit v1.2.3