summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Merger.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Threads/Merger.hs')
-rw-r--r--Assistant/Threads/Merger.hs16
1 files changed, 9 insertions, 7 deletions
diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs
index f1a64925d..35d02322d 100644
--- a/Assistant/Threads/Merger.hs
+++ b/Assistant/Threads/Merger.hs
@@ -17,7 +17,7 @@ import Utility.DirWatcher.Types
import qualified Annex.Branch
import qualified Git
import qualified Git.Branch
-import Annex.AutoMerge
+import qualified Command.Sync
import Annex.TaggedPush
import Remote (remoteFromUUID)
@@ -72,19 +72,21 @@ onChange file
unlessM handleDesynced $
queueDeferredDownloads "retrying deferred download" Later
| "/synced/" `isInfixOf` file =
- mergecurrent =<< liftAnnex (inRepo Git.Branch.current)
+ mergecurrent =<< liftAnnex (join Command.Sync.getCurrBranch)
| otherwise = noop
where
changedbranch = fileToBranch file
- mergecurrent (Just current)
- | equivBranches changedbranch current =
- whenM (liftAnnex $ inRepo $ Git.Branch.changed current changedbranch) $ do
+ mergecurrent currbranch@(Just b, _)
+ | equivBranches changedbranch b =
+ whenM (liftAnnex $ inRepo $ Git.Branch.changed b changedbranch) $ do
debug
[ "merging", Git.fromRef changedbranch
- , "into", Git.fromRef current
+ , "into", Git.fromRef b
]
- void $ liftAnnex $ autoMergeFrom changedbranch (Just current) Git.Branch.AutomaticCommit
+ void $ liftAnnex $ Command.Sync.merge
+ currbranch Git.Branch.AutomaticCommit
+ changedbranch
mergecurrent _ = noop
handleDesynced = case fromTaggedBranch changedbranch of