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,10 +24,10 @@ recordActivity :: Activity -> UUID -> Annex ()
|
|||
recordActivity act uuid = do
|
||||
c <- liftIO currentVectorClock
|
||||
Annex.Branch.change activityLog $
|
||||
showLog show . changeLog c uuid act . parseLog readish
|
||||
encodeBL . showLog show . changeLog c uuid act . parseLog readish . decodeBL
|
||||
|
||||
lastActivities :: Maybe Activity -> Annex (Log Activity)
|
||||
lastActivities wantact = parseLog onlywanted <$> Annex.Branch.get activityLog
|
||||
lastActivities wantact = parseLog onlywanted . decodeBL <$> Annex.Branch.get activityLog
|
||||
where
|
||||
onlywanted s = case readish s of
|
||||
Just a | wanted a -> Just a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue