refactor
This commit is contained in:
parent
4d0223e962
commit
3149a62a35
6 changed files with 13 additions and 16 deletions
|
@ -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 ++ ") "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue