diff options
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Branch.hs | 1 | ||||
-rw-r--r-- | Annex/Content.hs | 4 | ||||
-rw-r--r-- | Annex/Queue.hs | 9 |
3 files changed, 7 insertions, 7 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index ce1dd58ce..706522f3b 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -330,6 +330,7 @@ setCommitted = void $ do {- Stages the journal into the index. -} stageJournal :: Annex () stageJournal = do + showStoringStateAction fs <- getJournalFiles g <- gitRepo withIndex $ liftIO $ do 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) 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' |