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 --- Types/Command.hs | 2 +- Types/Messages.hs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Types') diff --git a/Types/Command.hs b/Types/Command.hs index e12873850..aa22143dd 100644 --- a/Types/Command.hs +++ b/Types/Command.hs @@ -40,7 +40,7 @@ type CommandCleanup = Annex Bool data Command = Command { cmdcheck :: [CommandCheck] -- check stage , cmdnocommit :: Bool -- don't commit journalled state changes - , cmdnomessages :: Bool -- don't output normal messages + , cmdnomessages :: Bool -- don't output normal messages , cmdname :: String , cmdparamdesc :: CmdParamsDesc -- description of params for usage , cmdsection :: CommandSection diff --git a/Types/Messages.hs b/Types/Messages.hs index e8dbb8e89..f9e09ecd7 100644 --- a/Types/Messages.hs +++ b/Types/Messages.hs @@ -24,6 +24,7 @@ data SideActionBlock = NoBlock | StartBlock | InBlock data MessageState = MessageState { outputType :: OutputType , sideActionBlock :: SideActionBlock + , implicitMessages :: Bool #ifdef WITH_CONCURRENTOUTPUT , consoleRegion :: Maybe ConsoleRegion , consoleRegionErrFlag :: Bool @@ -35,6 +36,7 @@ instance Default MessageState def = MessageState { outputType = NormalOutput , sideActionBlock = NoBlock + , implicitMessages = True #ifdef WITH_CONCURRENTOUTPUT , consoleRegion = Nothing , consoleRegionErrFlag = False -- cgit v1.2.3