summaryrefslogtreecommitdiff
path: root/Messages.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-26 15:53:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-26 15:53:01 -0400
commit541178b499d084e4041ae4b9d62bf86f5a97c3ff (patch)
treec47863a99db0631890802909583ac5003dda416f /Messages.hs
parent257d1136e4178665fd52f14a2d430f9ad819d45f (diff)
refactor
Diffstat (limited to 'Messages.hs')
-rw-r--r--Messages.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Messages.hs b/Messages.hs
index 0357da12d..9f473110a 100644
--- a/Messages.hs
+++ b/Messages.hs
@@ -1,12 +1,13 @@
{- git-annex output messages
-
- - Copyright 2010-2011 Joey Hess <joey@kitenet.net>
+ - Copyright 2010-2014 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Messages (
showStart,
+ showStart',
showNote,
showAction,
showProgress,
@@ -54,10 +55,14 @@ import Types.Key
import qualified Annex
import Utility.Metered
-showStart :: String -> String -> Annex ()
+showStart :: String -> FilePath -> Annex ()
showStart command file = handle (JSON.start command $ Just file) $
flushed $ putStr $ command ++ " " ++ file ++ " "
+showStart' :: String -> Key -> Maybe FilePath -> Annex ()
+showStart' command key afile = showStart command $
+ fromMaybe (key2file key) afile
+
showNote :: String -> Annex ()
showNote s = handle (JSON.note s) $
flushed $ putStr $ "(" ++ s ++ ") "