From c1d7a5b97c7aecb1188cd72cf0e006f67902cfed Mon Sep 17 00:00:00 2001
From: Joey Hess <joeyh@joeyh.name>
Date: Mon, 29 Feb 2016 15:29:56 -0400
Subject: [PATCH] push original branch when on adjusted branch

---
 Assistant/XMPP/Git.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs
index 2841a1cf8b..9e0b9278b0 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