convert git-annex branch access to ByteStrings and Builders
Most of the individual logs are not converted yet, only presense logs have an efficient ByteString Builder implemented so far. The rest convert to and from String.
This commit is contained in:
parent
53905490df
commit
bfc9039ead
27 changed files with 163 additions and 120 deletions
|
@ -24,13 +24,13 @@ trustSet :: UUID -> TrustLevel -> Annex ()
|
|||
trustSet uuid@(UUID _) level = do
|
||||
c <- liftIO currentVectorClock
|
||||
Annex.Branch.change trustLog $
|
||||
showLog showTrustLog .
|
||||
encodeBL . showLog showTrustLog .
|
||||
changeLog c uuid level .
|
||||
parseLog (Just . parseTrustLog)
|
||||
parseLog (Just . parseTrustLog) . decodeBL
|
||||
Annex.changeState $ \s -> s { Annex.trustmap = Nothing }
|
||||
trustSet NoUUID _ = error "unknown UUID; cannot modify"
|
||||
|
||||
{- Does not include forcetrust or git config values, just those from the
|
||||
- log file. -}
|
||||
trustMapRaw :: Annex TrustMap
|
||||
trustMapRaw = calcTrustMap <$> Annex.Branch.get trustLog
|
||||
trustMapRaw = calcTrustMap . decodeBL <$> Annex.Branch.get trustLog
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue