diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-02-16 13:24:16 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-02-16 13:24:35 -0400 |
commit | 34bcff4cba4a8f866110309ae00bcd4a8deb7551 (patch) | |
tree | a187a962bb859d8a77ef59c459e5cc2ace0dd795 /Command/Wanted.hs | |
parent | b65b8fe7f1b63403e8b1fd1e149e0adb5b00277d (diff) |
make query commands not output extraneous messages
config group groupwanted numcopies schedule wanted required: Avoid
displaying extraneous messages about repository auto-init, git-annex branch
merging, etc, when being used to get information.
Diffstat (limited to 'Command/Wanted.hs')
-rw-r--r-- | Command/Wanted.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Command/Wanted.hs b/Command/Wanted.hs index 8fd369df6..fc1fa86bd 100644 --- a/Command/Wanted.hs +++ b/Command/Wanted.hs @@ -8,10 +8,8 @@ module Command.Wanted where import Command -import qualified Annex import qualified Remote import Logs.PreferredContent -import Types.Messages import Types.StandardGroups import qualified Data.Map as M @@ -27,7 +25,8 @@ cmd' -> Annex (M.Map UUID PreferredContentExpression) -> (UUID -> PreferredContentExpression -> Annex ()) -> Command -cmd' name desc getter setter = command name SectionSetup desc pdesc (withParams seek) +cmd' name desc getter setter = noMessages $ + command name SectionSetup desc pdesc (withParams seek) where pdesc = paramPair paramRemote (paramOptional paramExpression) @@ -35,6 +34,7 @@ cmd' name desc getter setter = command name SectionSetup desc pdesc (withParams start (rname:[]) = go rname (performGet getter) start (rname:expr:[]) = go rname $ \uuid -> do + allowMessages showStart name rname performSet setter expr uuid start _ = giveup "Specify a repository." @@ -45,7 +45,6 @@ cmd' name desc getter setter = command name SectionSetup desc pdesc (withParams performGet :: Ord a => Annex (M.Map a PreferredContentExpression) -> a -> CommandPerform performGet getter a = do - Annex.setOutput QuietOutput m <- getter liftIO $ putStrLn $ fromMaybe "" $ M.lookup a m next $ return True |