simplfy
This commit is contained in:
parent
eef1b7a3cc
commit
d6696dbc98
1 changed files with 2 additions and 6 deletions
|
@ -314,21 +314,17 @@ mergeFrom branch = do
|
||||||
, go
|
, go
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
go = runmerge $ inRepo $ Git.Merge.mergeNonInteractive branch
|
go = inRepo (Git.Merge.mergeNonInteractive branch) <||> resolveMerge
|
||||||
godirect currbranch = do
|
godirect currbranch = do
|
||||||
old <- inRepo $ Git.Ref.sha currbranch
|
old <- inRepo $ Git.Ref.sha currbranch
|
||||||
d <- fromRepo gitAnnexMergeDir
|
d <- fromRepo gitAnnexMergeDir
|
||||||
r <- runmerge $ inRepo $ mergeDirect d branch
|
r <- inRepo (mergeDirect d branch) <||> resolveMerge
|
||||||
new <- inRepo $ Git.Ref.sha currbranch
|
new <- inRepo $ Git.Ref.sha currbranch
|
||||||
case (old, new) of
|
case (old, new) of
|
||||||
(Just oldsha, Just newsha) ->
|
(Just oldsha, Just newsha) ->
|
||||||
mergeDirectCleanup d oldsha newsha
|
mergeDirectCleanup d oldsha newsha
|
||||||
_ -> noop
|
_ -> noop
|
||||||
return r
|
return r
|
||||||
runmerge a = ifM a
|
|
||||||
( return True
|
|
||||||
, resolveMerge
|
|
||||||
)
|
|
||||||
|
|
||||||
{- Resolves a conflicted merge. It's important that any conflicts be
|
{- Resolves a conflicted merge. It's important that any conflicts be
|
||||||
- resolved in a way that itself avoids later merge conflicts, since
|
- resolved in a way that itself avoids later merge conflicts, since
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue