--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.
This commit is contained in:
Joey Hess 2015-03-25 17:06:14 -04:00
parent 59e0df02ec
commit cd6b62f35e
19 changed files with 86 additions and 69 deletions

View file

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