aboutsummaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-11 18:39:21 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-11 18:39:21 -0400
commitccfda0a1b479f131e69e0158b4269dc98982b268 (patch)
treef2ade0df2e6b5238615b56037bd01268f7ac7dfd /Config.hs
parent76090d48b97a2b29da03a2955e90da71d3842e82 (diff)
git config remote.name.annex-sync can be used to control whether a remote gets synced.
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs5
1 files changed, 5 insertions, 0 deletions
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