aboutsummaryrefslogtreecommitdiff
path: root/Messages.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Messages.hs')
-rw-r--r--Messages.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Messages.hs b/Messages.hs
index 7b4cff102..cec0cb8a3 100644
--- a/Messages.hs
+++ b/Messages.hs
@@ -36,6 +36,7 @@ module Messages (
debugEnabled,
commandProgressDisabled,
outputMessage,
+ implicitMessage,
) where
import Text.JSON
@@ -212,3 +213,9 @@ commandProgressDisabled = withOutputType $ \t -> return $ case t of
JSONOutput -> True
NormalOutput -> False
ConcurrentOutput _ -> True
+
+{- Use to show a message that is displayed implicitly, and so might be
+ - disabled when running a certian command that needs more control over its
+ - output. -}
+implicitMessage :: Annex () -> Annex ()
+implicitMessage = whenM (implicitMessages <$> Annex.getState Annex.output)