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
|
@ -110,9 +110,9 @@ addMetaDataClocked' getlogfile k d@(MetaData m) c
|
|||
| otherwise = do
|
||||
config <- Annex.getGitConfig
|
||||
Annex.Branch.change (getlogfile config k) $
|
||||
showLog . simplifyLog
|
||||
encodeBL . showLog . simplifyLog
|
||||
. S.insert (LogEntry c metadata)
|
||||
. parseLog
|
||||
. parseLog . decodeBL
|
||||
where
|
||||
metadata = MetaData $ M.filterWithKey (\f _ -> not (isLastChangedField f)) m
|
||||
|
||||
|
@ -145,8 +145,8 @@ copyMetaData oldkey newkey
|
|||
else do
|
||||
config <- Annex.getGitConfig
|
||||
Annex.Branch.change (metaDataLogFile config newkey) $
|
||||
const $ showLog l
|
||||
const $ encodeBL $ showLog l
|
||||
return True
|
||||
|
||||
readLog :: FilePath -> Annex (Log MetaData)
|
||||
readLog = parseLog <$$> Annex.Branch.get
|
||||
readLog = parseLog . decodeBL <$$> Annex.Branch.get
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue