diff options
Diffstat (limited to 'Assistant/Sync.hs')
-rw-r--r-- | Assistant/Sync.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Assistant/Sync.hs b/Assistant/Sync.hs index 1b9de1656..cff4f95e0 100644 --- a/Assistant/Sync.hs +++ b/Assistant/Sync.hs @@ -20,6 +20,7 @@ import Utility.Parallel import qualified Git import qualified Git.Branch import qualified Git.Command +import qualified Git.Ref import qualified Remote import qualified Types.Remote as Remote import qualified Annex.Branch @@ -112,8 +113,11 @@ pushToRemotes' now notifypushes remotes = do <*> getUUID let (xmppremotes, normalremotes) = partition isXMPPRemote remotes ret <- go True branch g u normalremotes - forM_ xmppremotes $ \r -> - sendNetMessage $ Pushing (getXMPPClientID r) (CanPush u) + unless (null xmppremotes) $ do + shas <- liftAnnex $ map fst <$> + inRepo (Git.Ref.matching [Annex.Branch.fullname, Git.Ref.headRef]) + forM_ xmppremotes $ \r -> sendNetMessage $ + Pushing (getXMPPClientID r) (CanPush u shas) return ret where go _ Nothing _ _ _ = return [] -- no branch, so nothing to do |