aboutsummaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-09-05 15:32:59 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-09-05 15:34:38 -0400
commit1a5415ba53e2c231eef4801a928a175ca7fe4c1f (patch)
treed29e09a3356201c8e9f21c7fd164157188859523 /Types
parent31f118f51dc3a8a32c0257209544dfb50542f696 (diff)
Make --json and --quiet suppress automatic init messages
And any other messages that might be output before a command starts. Fixes a reversion introduced in version 5.20150727. During the optparse-applicative conversion, I needed a place to run per-command global option setters, and I made it get run during the seek stage. But that is too late to have --json and --quiet disable output produced in the check stage. Fix is just to run those per-command global option setters at the same time as the all-command global option setters. This commit was sponsored by Thom May.
Diffstat (limited to 'Types')
-rw-r--r--Types/Command.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Types/Command.hs b/Types/Command.hs
index aa22143dd..baf4934e4 100644
--- a/Types/Command.hs
+++ b/Types/Command.hs
@@ -1,6 +1,6 @@
{- git-annex command data types
-
- - Copyright 2010-2015 Joey Hess <id@joeyh.name>
+ - Copyright 2010-2016 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -11,6 +11,7 @@ import Data.Ord
import Options.Applicative.Types (Parser)
import Types
+import Types.DeferredParse
{- A command runs in these stages.
-
@@ -46,6 +47,7 @@ data Command = Command
, cmdsection :: CommandSection
, cmddesc :: String -- description of command for usage
, cmdparser :: CommandParser -- command line parser
+ , cmdglobaloptions :: [GlobalOption] -- additional global options
, cmdnorepo :: Maybe (Parser (IO ())) -- used when not in a repo
}