git config remote.name.annex-sync can be used to control whether a remote gets synced.

This commit is contained in:
Joey Hess 2012-10-11 18:39:21 -04:00
parent 1591245f88
commit 589d1711f2
4 changed files with 15 additions and 1 deletions

View file

@ -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