summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Annex/AutoMerge.hs11
-rw-r--r--Assistant/Threads/Merger.hs7
2 files changed, 9 insertions, 9 deletions
diff --git a/Annex/AutoMerge.hs b/Annex/AutoMerge.hs
index 26f58a98e..06efdb7f5 100644
--- a/Annex/AutoMerge.hs
+++ b/Annex/AutoMerge.hs
@@ -52,8 +52,15 @@ autoMergeFrom branch currbranch mergeconfig commitmode = do
where
go old = ifM isDirect
( mergeDirect currbranch old branch (resolveMerge old branch False) mergeconfig commitmode
- , inRepo (Git.Merge.merge branch mergeconfig commitmode)
- <||> (resolveMerge old branch False <&&> commitResolvedMerge commitmode)
+ , do
+ r <- inRepo (Git.Merge.merge branch mergeconfig commitmode)
+ <||> (resolveMerge old branch False <&&> commitResolvedMerge commitmode)
+ -- Merging can cause new associated files to appear
+ -- and the smudge filter will add them to the database.
+ -- To ensure that this process sees those changes,
+ -- close the database if it was open.
+ Database.Keys.closeDb
+ return r
)
{- Resolves a conflicted merge. It's important that any conflicts be
diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs
index 0080ef964..521e5bda6 100644
--- a/Assistant/Threads/Merger.hs
+++ b/Assistant/Threads/Merger.hs
@@ -19,7 +19,6 @@ import qualified Annex.Branch
import qualified Git
import qualified Git.Branch
import qualified Command.Sync
-import qualified Database.Keys
import Annex.TaggedPush
import Remote (remoteFromUUID)
@@ -90,12 +89,6 @@ onChange file
currbranch mergeConfig
Git.Branch.AutomaticCommit
changedbranch
- -- Merging can cause new associated files
- -- to appear and the smudge filter will
- -- add them to the database. To ensure that
- -- this process sees those changes, close
- -- the database if it was open.
- liftAnnex $ Database.Keys.closeDb
mergecurrent _ = noop
handleDesynced = case fromTaggedBranch changedbranch of