fix merge conflict resolution when both sides have the same key
Still need to git rm the old file so git accepts the merge is resolved.
This commit is contained in:
parent
749beb5899
commit
f1cce62283
1 changed files with 7 additions and 7 deletions
|
@ -248,8 +248,13 @@ resolveMerge' :: LsFiles.Unmerged -> Annex Bool
|
||||||
resolveMerge' u
|
resolveMerge' u
|
||||||
| issymlink LsFiles.valUs && issymlink LsFiles.valThem =
|
| issymlink LsFiles.valUs && issymlink LsFiles.valThem =
|
||||||
withKey LsFiles.valUs $ \keyUs ->
|
withKey LsFiles.valUs $ \keyUs ->
|
||||||
withKey LsFiles.valThem $ \keyThem -> do
|
withKey LsFiles.valThem $ \keyThem -> do
|
||||||
go keyUs keyThem
|
ifM isDirect
|
||||||
|
( maybe noop (\k -> removeDirect k file) keyUs
|
||||||
|
, liftIO $ nukeFile file
|
||||||
|
)
|
||||||
|
Annex.Queue.addCommand "rm" [Params "--quiet -f --"] [file]
|
||||||
|
go keyUs keyThem
|
||||||
| otherwise = return False
|
| otherwise = return False
|
||||||
where
|
where
|
||||||
go keyUs keyThem
|
go keyUs keyThem
|
||||||
|
@ -257,11 +262,6 @@ resolveMerge' u
|
||||||
makelink keyUs
|
makelink keyUs
|
||||||
return True
|
return True
|
||||||
| otherwise = do
|
| otherwise = do
|
||||||
ifM isDirect
|
|
||||||
( maybe noop (\k -> removeDirect k file) keyUs
|
|
||||||
, liftIO $ nukeFile file
|
|
||||||
)
|
|
||||||
Annex.Queue.addCommand "rm" [Params "--quiet -f --"] [file]
|
|
||||||
makelink keyUs
|
makelink keyUs
|
||||||
makelink keyThem
|
makelink keyThem
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue