separate data type for push stages

This improves type safety.
This commit is contained in:
Joey Hess 2012-11-10 12:18:00 -04:00
parent dedd2a407e
commit 81953c2131
6 changed files with 76 additions and 76 deletions

View file

@ -98,9 +98,10 @@ pushToRemotes now notifypushes remotes = do
<*> inRepo Git.Branch.current
<*> getUUID
let (xmppremotes, normalremotes) = partition isXMPPRemote remotes
r <- go True branch g u normalremotes
mapM_ (sendNetMessage . CanPush . getXMPPClientID) xmppremotes
return r
ret <- go True branch g u normalremotes
forM_ xmppremotes $ \r ->
sendNetMessage $ Pushing (getXMPPClientID r) CanPush
return ret
where
go _ Nothing _ _ _ = return True -- no branch, so nothing to do
go shouldretry (Just branch) g u rs = do