aboutsummaryrefslogtreecommitdiff
path: root/Option.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Option.hs')
-rw-r--r--Option.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Option.hs b/Option.hs
index d59af43c7..64ba56f6d 100644
--- a/Option.hs
+++ b/Option.hs
@@ -16,7 +16,6 @@ module Option (
) where
import System.Console.GetOpt
-import System.Log.Logger
import Common.Annex
import qualified Annex
@@ -40,6 +39,8 @@ common =
"enable JSON output"
, Option ['d'] ["debug"] (NoArg setdebug)
"show debug messages"
+ , Option [] ["no-debug"] (NoArg unsetdebug)
+ "don't show debug messages"
, Option ['b'] ["backend"] (ReqArg setforcebackend paramName)
"specify key-value backend to use"
]
@@ -48,7 +49,8 @@ common =
setfast v = Annex.changeState $ \s -> s { Annex.fast = v }
setauto v = Annex.changeState $ \s -> s { Annex.auto = v }
setforcebackend v = Annex.changeState $ \s -> s { Annex.forcebackend = Just v }
- setdebug = liftIO $ updateGlobalLogger rootLoggerName $ setLevel DEBUG
+ setdebug = Annex.changeGitConfig $ \c -> c { annexDebug = True }
+ unsetdebug = Annex.changeGitConfig $ \c -> c { annexDebug = False }
matcher :: [Option]
matcher =