push RawFilePath down into Annex.ReplaceFile
Minor optimisation, but a win in every case, except for a couple where it's a wash. Note that replaceFile still takes a FilePath, because it needs to operate on Chars to truncate unicode filenames properly.
This commit is contained in:
parent
c873586e14
commit
d9fd205cbb
12 changed files with 38 additions and 44 deletions
|
@ -242,7 +242,7 @@ resolveMerge' unstagedmap (Just us) them inoverlay u = do
|
|||
stageSymlink dest' =<< hashSymlink l
|
||||
|
||||
replacewithsymlink dest link = replaceWorkTreeFile dest $
|
||||
makeGitLink link . toRawFilePath
|
||||
makeGitLink link
|
||||
|
||||
makepointer key dest destmode = do
|
||||
unless inoverlay $
|
||||
|
@ -267,10 +267,10 @@ resolveMerge' unstagedmap (Just us) them inoverlay u = do
|
|||
Nothing -> noop
|
||||
Just sha -> replaceWorkTreeFile item $ \tmp -> do
|
||||
c <- catObject sha
|
||||
liftIO $ L.writeFile tmp c
|
||||
liftIO $ L.writeFile (decodeBS tmp) c
|
||||
when isexecutable $
|
||||
liftIO $ void $ tryIO $
|
||||
modifyFileMode (toRawFilePath tmp) $
|
||||
modifyFileMode tmp $
|
||||
addModes executeModes
|
||||
|
||||
-- Update the work tree to reflect the graft.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue