push original branch when on adjusted branch

This commit is contained in:
Joey Hess 2016-02-29 15:29:56 -04:00
parent 7c20bf6e7a
commit c1d7a5b97c
Failed to extract signature

View file

@ -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