diff options
author | 2011-06-22 21:19:52 -0400 | |
---|---|---|
committer | 2011-06-22 21:21:09 -0400 | |
commit | c4e6730042e64e3b2f92626aee4a6b38a8f9c70c (patch) | |
tree | 569c5539530a40e24890eb267f0f54ddf24c2282 /Content.hs | |
parent | c0fbd3017f215cd61d79d24e110ce177e4823089 (diff) |
commit git-annex branch when copying to a remote (locally)
Otherwise, the location log changes are only staged in its index,
and this can confuse matters if pulling or cloning from the remote.
The test suite was failing because this wasn't done.
Diffstat (limited to 'Content.hs')
-rw-r--r-- | Content.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Content.hs b/Content.hs index 45653fc9e..d733ad8b3 100644 --- a/Content.hs +++ b/Content.hs @@ -19,7 +19,8 @@ module Content ( removeAnnex, fromAnnex, moveBad, - getKeysPresent + getKeysPresent, + saveState ) where import System.IO.Error (try) @@ -37,6 +38,8 @@ import LocationLog import UUID import qualified GitRepo as Git import qualified Annex +import qualified AnnexQueue +import qualified Branch import Utility import StatFS import Types.Key @@ -263,3 +266,9 @@ getKeysPresent' dir = do case result of Right s -> return $ isRegularFile s Left _ -> return False + +{- Things to do to record changes to content. -} +saveState :: Annex () +saveState = do + AnnexQueue.flush False + Branch.commit "update" |