From ccfda0a1b479f131e69e0158b4269dc98982b268 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Oct 2012 18:39:21 -0400 Subject: git config remote.name.annex-sync can be used to control whether a remote gets synced. --- Config.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index 2c26adc73..04ab66507 100644 --- a/Config.hs +++ b/Config.hs @@ -86,6 +86,11 @@ repoNotIgnored :: Git.Repo -> Annex Bool repoNotIgnored r = not . fromMaybe False . Git.Config.isTrue <$> getRemoteConfig r "ignore" "" +{- Checks if a repo should be synced. -} +repoSyncable :: Git.Repo -> Annex Bool +repoSyncable r = fromMaybe True . Git.Config.isTrue + <$> getRemoteConfig r "sync" "" + {- If a value is specified, it is used; otherwise the default is looked up - in git config. forcenumcopies overrides everything. -} getNumCopies :: Maybe Int -> Annex Int -- cgit v1.2.3