fuzz test discovered a way automatic merge resultion can fail; fix
It may be that the directory we need to make a symlink in, to resolve the merge, doesn't exist locally.
This commit is contained in:
parent
33fe3dac9e
commit
fc37456d0f
1 changed files with 2 additions and 2 deletions
|
@ -28,6 +28,7 @@ import qualified Types.Remote
|
||||||
import qualified Remote.Git
|
import qualified Remote.Git
|
||||||
import Types.Key
|
import Types.Key
|
||||||
import Config
|
import Config
|
||||||
|
import Annex.ReplaceFile
|
||||||
|
|
||||||
import Data.Hash.MD5
|
import Data.Hash.MD5
|
||||||
|
|
||||||
|
@ -270,8 +271,7 @@ resolveMerge' u
|
||||||
makelink (Just key) = do
|
makelink (Just key) = do
|
||||||
let dest = mergeFile file key
|
let dest = mergeFile file key
|
||||||
l <- inRepo $ gitAnnexLink dest key
|
l <- inRepo $ gitAnnexLink dest key
|
||||||
liftIO $ nukeFile dest
|
replaceFile dest $ addAnnexLink l
|
||||||
addAnnexLink l dest
|
|
||||||
whenM (isDirect) $
|
whenM (isDirect) $
|
||||||
toDirect key dest
|
toDirect key dest
|
||||||
makelink _ = noop
|
makelink _ = noop
|
||||||
|
|
Loading…
Reference in a new issue