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/Content.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/Content.hs')
-rw-r--r-- | Annex/Content.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index 01ee7d83d..b5754e15b 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -297,8 +297,8 @@ getKeysPresent = liftIO . traverse (2 :: Int) =<< fromRepo gitAnnexObjectDir - especially if performing a short-lived action. -} saveState :: Bool -> Annex () -saveState oneshot = do - Annex.Queue.flush False +saveState oneshot = doSideAction $ do + Annex.Queue.flush unless oneshot $ ifM alwayscommit ( Annex.Branch.commit "update" , Annex.Branch.stage) |