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
|
||||
| issymlink LsFiles.valUs && issymlink LsFiles.valThem =
|
||||
withKey LsFiles.valUs $ \keyUs ->
|
||||
withKey LsFiles.valThem $ \keyThem -> do
|
||||
go keyUs keyThem
|
||||
withKey LsFiles.valThem $ \keyThem -> do
|
||||
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
|
||||
where
|
||||
go keyUs keyThem
|
||||
|
@ -257,11 +262,6 @@ resolveMerge' u
|
|||
makelink keyUs
|
||||
return True
|
||||
| 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 keyThem
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue