From 453ba048af869ed731e54f39b8b9db7d6859510a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 29 Feb 2016 15:29:56 -0400 Subject: push original branch when on adjusted branch --- Assistant/XMPP/Git.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Assistant') diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs index 2841a1cf8..9e0b9278b 100644 --- a/Assistant/XMPP/Git.hs +++ b/Assistant/XMPP/Git.hs @@ -292,10 +292,9 @@ 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 $ (,) @@ -311,6 +310,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 -- cgit v1.2.3