use file-io for readFile/writeFile/appendFile on ByteStrings
These are all straightforward, and easy small performance wins. Sponsored-by: Nicholas Golder-Manning
This commit is contained in:
parent
90cd3aad37
commit
9b79f0f43d
19 changed files with 63 additions and 52 deletions
|
@ -35,10 +35,10 @@ import Annex.InodeSentinal
|
|||
import Utility.InodeCache
|
||||
import Utility.FileMode
|
||||
import qualified Utility.RawFilePath as R
|
||||
import qualified Utility.FileIO as F
|
||||
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
import System.PosixCompat.Files (isSymbolicLink)
|
||||
|
||||
{- Merges from a branch into the current branch (which may not exist yet),
|
||||
|
@ -268,7 +268,7 @@ resolveMerge' unstagedmap (Just us) them inoverlay u = do
|
|||
Nothing -> noop
|
||||
Just sha -> replaceWorkTreeFile (toRawFilePath item) $ \tmp -> do
|
||||
c <- catObject sha
|
||||
liftIO $ L.writeFile (decodeBS tmp) c
|
||||
liftIO $ F.writeFile (toOsPath tmp) c
|
||||
when isexecutable $
|
||||
liftIO $ void $ tryIO $
|
||||
modifyFileMode tmp $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue