From 541178b499d084e4041ae4b9d62bf86f5a97c3ff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 26 Jan 2014 15:53:01 -0400 Subject: refactor --- Messages.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Messages.hs') 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 + - Copyright 2010-2014 Joey Hess - - 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 ++ ") " -- cgit v1.2.3