display "Recording state in git..." when staging the journal
A bit tricky to avoid printing it twice in a row when there are queued git commands to run and journal to stage. Added a generic way to run an action that may output multiple side messages, with only the first displayed.
This commit is contained in:
parent
e0b7012ccc
commit
76102c1c75
8 changed files with 72 additions and 27 deletions
20
Types/Messages.hs
Normal file
20
Types/Messages.hs
Normal file
|
@ -0,0 +1,20 @@
|
|||
{- git-annex Messages data types
|
||||
-
|
||||
- Copyright 2012 Joey Hess <joey@kitenet.net>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
module Types.Messages where
|
||||
|
||||
data OutputType = NormalOutput | QuietOutput | JSONOutput
|
||||
|
||||
data SideActionBlock = NoBlock | StartBlock | InBlock
|
||||
|
||||
data MessageState = MessageState
|
||||
{ outputType :: OutputType
|
||||
, sideActionBlock :: SideActionBlock
|
||||
}
|
||||
|
||||
defaultMessageState :: MessageState
|
||||
defaultMessageState = MessageState NormalOutput NoBlock
|
Loading…
Add table
Add a link
Reference in a new issue