aboutsummaryrefslogtreecommitdiff
path: root/CmdLine/Seek.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-03-25 17:06:14 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-03-25 17:06:14 -0400
commit850241b7fed075c8a0055ae77cb30d6485aaa795 (patch)
treebbae2d577ea7daf136cfb80cdf87e4ce76681f84 /CmdLine/Seek.hs
parent644cd4ca27e410ca567ec0f78acf2517d91d330e (diff)
--auto is no longer a global option; only get, drop, and copy accept it.
Not a behavior change unless you were passing it to a command that ignored it.
Diffstat (limited to 'CmdLine/Seek.hs')
-rw-r--r--CmdLine/Seek.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/CmdLine/Seek.hs b/CmdLine/Seek.hs
index 7bfea45d0..b5726f53e 100644
--- a/CmdLine/Seek.hs
+++ b/CmdLine/Seek.hs
@@ -173,13 +173,12 @@ withNothing _ _ = error "This command takes no parameters."
-
- Otherwise, fall back to a regular CommandSeek action on
- whatever params were passed. -}
-withKeyOptions :: (Key -> CommandStart) -> CommandSeek -> CommandSeek
-withKeyOptions keyop fallbackop params = do
+withKeyOptions :: Bool -> (Key -> CommandStart) -> CommandSeek -> CommandSeek
+withKeyOptions auto keyop fallbackop params = do
bare <- fromRepo Git.repoIsLocalBare
allkeys <- Annex.getFlag "all"
unused <- Annex.getFlag "unused"
specifickey <- Annex.getField "key"
- auto <- Annex.getState Annex.auto
when (auto && bare) $
error "Cannot use --auto in a bare repository"
case (allkeys, unused, null params, specifickey) of