aboutsummaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-18 20:11:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-18 20:11:39 -0400
commitdd463a3100f21d72c35ca1af5b0f63f6296cf322 (patch)
tree048aa1402eb5b3717706cb97863f823904dec44e /Config.hs
parentd78b9f7d546bd4f13349e01777d5dd45fc01b0af (diff)
rework annex-ignore handling
Only one place need to filter the list of remotes for ignored remotes: keyPossibilities. Make the full list available to everything else. This allows getting rid of the special case handing for --from and --to to make ignored remotes not be ignored with those options.
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs14
1 files changed, 3 insertions, 11 deletions
diff --git a/Config.hs b/Config.hs
index b4f4c0b92..fe847fce1 100644
--- a/Config.hs
+++ b/Config.hs
@@ -82,18 +82,10 @@ prop_cost_sane = False `notElem`
{- Checks if a repo should be ignored, based either on annex-ignore
- setting, or on command-line options. Allows command-line to override
- annex-ignore. -}
-remoteNotIgnored :: Git.Repo -> Annex Bool
-remoteNotIgnored r = do
+repoNotIgnored :: Git.Repo -> Annex Bool
+repoNotIgnored r = do
ignored <- getConfig r "ignore" "false"
- to <- match Annex.toremote
- from <- match Annex.fromremote
- if to || from
- then return True
- else return $ not $ Git.configTrue ignored
- where
- match a = do
- n <- Annex.getState a
- return $ n == Git.repoRemoteName r
+ return $ not $ Git.configTrue ignored
{- If a value is specified, it is used; otherwise the default is looked up
- in git config. forcenumcopies overrides everything. -}