diff options
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Sync.hs | 10 | ||||
-rw-r--r-- | Assistant/Threads/Merger.hs | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs index ebdead00d..665394a4d 100644 --- a/Assistant/Sync.hs +++ b/Assistant/Sync.hs @@ -21,6 +21,7 @@ import Utility.Parallel import qualified Git import qualified Git.Command import qualified Git.Ref +import qualified Git.Merge import qualified Remote import qualified Types.Remote as Remote import qualified Remote.List as Remote @@ -238,12 +239,19 @@ manualPull currentbranch remotes = do ) haddiverged <- liftAnnex Annex.Branch.forceUpdate forM_ normalremotes $ \r -> - liftAnnex $ Command.Sync.mergeRemote r currentbranch + liftAnnex $ Command.Sync.mergeRemote r currentbranch mergeConfig u <- liftAnnex getUUID forM_ xmppremotes $ \r -> sendNetMessage $ Pushing (getXMPPClientID r) (PushRequest u) return (catMaybes failed, haddiverged) +mergeConfig :: [Git.Merge.MergeConfig] +mergeConfig = + [ Git.Merge.MergeNonInteractive + -- Pairing involves merging unrelated histories + , Git.Merge.MergeUnrelatedHistories + ] + {- Start syncing a remote, using a background thread. -} syncRemote :: Remote -> Assistant () syncRemote remote = do diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index 35d02322d..521e5bda6 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -12,6 +12,7 @@ import Assistant.TransferQueue import Assistant.BranchChange import Assistant.DaemonStatus import Assistant.ScanRemotes +import Assistant.Sync import Utility.DirWatcher import Utility.DirWatcher.Types import qualified Annex.Branch @@ -85,7 +86,8 @@ onChange file , "into", Git.fromRef b ] void $ liftAnnex $ Command.Sync.merge - currbranch Git.Branch.AutomaticCommit + currbranch mergeConfig + Git.Branch.AutomaticCommit changedbranch mergecurrent _ = noop |