convert replaceFile to createDirectoryUnder
Since it was used on both worktree and .git/annex files, split into multiple functions. In passing, this also improves permissions of created directories in .git/annex, using createAnnexDirectory on those.
This commit is contained in:
parent
b6c14a84ab
commit
eaa49ab53d
12 changed files with 53 additions and 26 deletions
|
@ -208,7 +208,7 @@ resolveMerge' unstagedmap (Just us) them inoverlay u = do
|
|||
stageSymlink dest' =<< hashSymlink l
|
||||
|
||||
replacewithsymlink dest link = withworktree dest $ \f ->
|
||||
replaceFile f $ makeGitLink link . toRawFilePath
|
||||
replaceWorkTreeFile f $ makeGitLink link . toRawFilePath
|
||||
|
||||
makepointer key dest destmode = do
|
||||
unless inoverlay $
|
||||
|
@ -256,7 +256,7 @@ resolveMerge' unstagedmap (Just us) them inoverlay u = do
|
|||
, case selectwant' (LsFiles.unmergedSha u) of
|
||||
Nothing -> noop
|
||||
Just sha -> withworktree item $ \f ->
|
||||
replaceFile f $ \tmp -> do
|
||||
replaceWorkTreeFile f $ \tmp -> do
|
||||
c <- catObject sha
|
||||
liftIO $ L.writeFile tmp c
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue