diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-27 13:23:52 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-27 13:54:33 -0400 |
commit | 76102c1c7541e7b10c3a3fbe242e9856fef955b3 (patch) | |
tree | e9c0b61fd1913c59c68dfa9929a860fc61d767bf /Annex/Queue.hs | |
parent | e0b7012ccc405dedb556b8c940eb66e42304bc73 (diff) |
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.
Diffstat (limited to 'Annex/Queue.hs')
-rw-r--r-- | Annex/Queue.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Annex/Queue.hs b/Annex/Queue.hs index f49a22069..728e29645 100644 --- a/Annex/Queue.hs +++ b/Annex/Queue.hs @@ -26,15 +26,14 @@ add command params files = do flushWhenFull :: Annex () flushWhenFull = do q <- get - when (Git.Queue.full q) $ flush False + when (Git.Queue.full q) flush {- Runs (and empties) the queue. -} -flush :: Bool -> Annex () -flush silent = do +flush :: Annex () +flush = do q <- get unless (0 == Git.Queue.size q) $ do - unless silent $ - showSideAction "Recording state in git" + showStoringStateAction q' <- inRepo $ Git.Queue.flush q store q' |