make sync aware of adjusted branches
So, it will pull and push the original branch, not the adjusted one. And, for merging, it will use updateAdjustedBranch (not implemented yet). Note that remaining uses of Git.Branch.current need to be checked too; for things that should act on the original branch, and not the adjusted branch.
This commit is contained in:
parent
9e1ebc2336
commit
7c20bf6e7a
8 changed files with 81 additions and 61 deletions
|
@ -227,7 +227,7 @@ commitStaged msg = do
|
|||
Right _ -> do
|
||||
ok <- Command.Sync.commitStaged Git.Branch.AutomaticCommit msg
|
||||
when ok $
|
||||
Command.Sync.updateSyncBranch =<< inRepo Git.Branch.current
|
||||
Command.Sync.updateSyncBranch =<< join Command.Sync.getCurrBranch
|
||||
return ok
|
||||
|
||||
{- OSX needs a short delay after a file is added before locking it down,
|
||||
|
|
|
@ -25,6 +25,7 @@ import Assistant.Pairing
|
|||
import Assistant.XMPP.Git
|
||||
import Annex.UUID
|
||||
import Logs.UUID
|
||||
import qualified Command.Sync
|
||||
|
||||
import Network.Protocol.XMPP
|
||||
import Control.Concurrent
|
||||
|
@ -33,7 +34,6 @@ import Control.Concurrent.STM (atomically)
|
|||
import qualified Data.Text as T
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.Map as M
|
||||
import qualified Git.Branch
|
||||
import Data.Time.Clock
|
||||
import Control.Concurrent.Async
|
||||
|
||||
|
@ -306,7 +306,7 @@ pull [] = noop
|
|||
pull us = do
|
||||
rs <- filter matching . syncGitRemotes <$> getDaemonStatus
|
||||
debug $ "push notification for" : map (fromUUID . Remote.uuid ) rs
|
||||
pullone rs =<< liftAnnex (inRepo Git.Branch.current)
|
||||
pullone rs =<< liftAnnex (join Command.Sync.getCurrBranch)
|
||||
where
|
||||
matching r = Remote.uuid r `S.member` s
|
||||
s = S.fromList us
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue