From 0c4e0046e72aab8216e3fe7d3f4252b1a66e1211 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 20 Jan 2016 14:07:13 -0400 Subject: make noMessages disable closing of json object in --json mode This allows things like Command.Find to use noMessages and generate their own complete json objects. Previouly, Command.Find managed that only via a hack, which wasn't compatable with batch mode. Only Command.Find, Command.Smudge, and Commange.Status use noMessages currently, and none except for Command.Find are impacted by this change. Fixes find --json --batch output --- Command.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Command.hs') diff --git a/Command.hs b/Command.hs index 387f7b8b5..e8c434b9b 100644 --- a/Command.hs +++ b/Command.hs @@ -66,8 +66,11 @@ withParams mkseek paramdesc = mkseek <$> cmdParams paramdesc noCommit :: Command -> Command noCommit c = c { cmdnocommit = True } -{- Indicates that a command should not output anything other than what - - it directly sends to stdout. (--json can override this). -} +{- Indicates that a command should not output the usual messages when + - starting or stopping processing a file or other item. Unless --json mode + - is enabled, this also enables quiet output mode, so only things + - explicitly output by the command are shown and not progress messages + - etc. -} noMessages :: Command -> Command noMessages c = c { cmdnomessages = True } -- cgit v1.2.3