avoid nul-truncation
This might be a little slower, but it's safer, in the event that a union-merged file contains a NUL. AFAIK, no files in the git-annex branch do.
This commit is contained in:
parent
23e9d3bb77
commit
06dac3bfed
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ mergeFile info file h repo = case filter (/= nullSha) [Ref asha, Ref bsha] of
|
|||
-- FileSystemEncoding for this is a hack, but ensures there
|
||||
-- are no decoding errors. Note that this works because
|
||||
-- hashObject sets fileEncoding on its write handle.
|
||||
getcontents s = lines . encodeW8 . L.unpack <$> catObject h s
|
||||
getcontents s = lines . encodeW8NUL . L.unpack <$> catObject h s
|
||||
|
||||
{- Calculates a union merge between a list of refs, with contents.
|
||||
-
|
||||
|
|
Loading…
Reference in a new issue