diff options
Diffstat (limited to 'Annex/Branch.hs')
-rw-r--r-- | Annex/Branch.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index 6cb279702..2c7683e9e 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -57,6 +57,7 @@ import Annex.CatFile import Annex.Perms import Logs import Logs.Transitions +import Logs.File import Logs.Trust.Pure import Logs.Difference.Pure import Annex.ReplaceFile @@ -420,8 +421,7 @@ needUpdateIndex branchref = do setIndexSha :: Git.Ref -> Annex () setIndexSha ref = do f <- fromRepo gitAnnexIndexStatus - liftIO $ writeFile f $ fromRef ref ++ "\n" - setAnnexFilePerm f + writeLogFile f $ fromRef ref ++ "\n" runAnnexHook postUpdateAnnexHook {- Stages the journal into the index and returns an action that will @@ -583,7 +583,7 @@ ignoreRefs rs = do old <- getIgnoredRefs let s = S.unions [old, S.fromList rs] f <- fromRepo gitAnnexIgnoredRefs - replaceFile f $ \tmp -> liftIO $ writeFile tmp $ + writeLogFile f $ unlines $ map fromRef $ S.elems s getIgnoredRefs :: Annex (S.Set Git.Sha) @@ -600,7 +600,7 @@ addMergedRefs new = do -- Keep only the newest sha for each branch. let l = nubBy ((==) `on` snd) (new ++ old) f <- fromRepo gitAnnexMergedRefs - replaceFile f $ \tmp -> liftIO $ writeFile tmp $ + writeLogFile f $ unlines $ map (\(s, b) -> fromRef s ++ '\t' : fromRef b) l getMergedRefs :: Annex (S.Set Git.Sha) |