diff options
Diffstat (limited to 'Assistant/XMPP/Git.hs')
-rw-r--r-- | Assistant/XMPP/Git.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs index 2841a1cf8..612e0f2c5 100644 --- a/Assistant/XMPP/Git.hs +++ b/Assistant/XMPP/Git.hs @@ -27,7 +27,6 @@ import Annex.TaggedPush import Annex.CatFile import Config import Git -import qualified Git.Branch import qualified Types.Remote as Remote import qualified Remote as Remote import Remote.List @@ -292,16 +291,15 @@ xmppRemotes cid theiruuid = case baseJID <$> parseJID cid of {- Returns the ClientID that it pushed to. -} runPush :: (Remote -> Assistant ()) -> NetMessage -> Assistant (Maybe ClientID) runPush checkcloudrepos (Pushing cid (PushRequest theiruuid)) = - go =<< liftAnnex (inRepo Git.Branch.current) + go =<< liftAnnex (join Command.Sync.getCurrBranch) where - go Nothing = return Nothing - go (Just branch) = do + go (Just branch, _) = do rs <- xmppRemotes cid theiruuid liftAnnex $ Annex.Branch.commit "update" (g, u) <- liftAnnex $ (,) <$> gitRepo <*> getUUID - liftIO $ Command.Sync.updateBranch (Command.Sync.syncBranch branch) g + liftIO $ Command.Sync.updateBranch (Command.Sync.syncBranch branch) branch g selfjid <- ((T.unpack <$>) . xmppClientID) <$> getDaemonStatus if null rs then return Nothing @@ -311,6 +309,7 @@ runPush checkcloudrepos (Pushing cid (PushRequest theiruuid)) = xmppPush cid (taggedPush u selfjid branch r) checkcloudrepos r return $ Just cid + go _ = return Nothing runPush checkcloudrepos (Pushing cid (StartingPush theiruuid)) = do rs <- xmppRemotes cid theiruuid if null rs |