-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot open new pull requests H p #358
Comments
I'm assuming you did push the branch before trying to open the PR? Assuming you still have the branch around (or a branch that can reproduce this issue; feel free to use |
Hi @vermiculus, sorry for late reply, it was happening for every branch, and yes I the branch was pushed on
I solved it by adding:
|
Ah, yes; this is working as designed, though I am a little confused: does magit know to push If that's not the case, I can add an |
Honestly I don't know git at this low level, but no it doesn't seem to set |
I'm not sure. @tarsius, do you have any wisdom on how |
Git respects that variable but never sets it. A few Magit commands offer to set it unless configured otherwise. |
I'm trying to get the upstream remote. Would I be correct in saying that branch.pushDefault should be preferred, but branch.remote could be a fallback? Edit More specifically I'm trying to get the remote tracking branch. |
I am not sure what you are asking for, so I have to be quite explicit. In order to open a pull request you have to tell github about two branches: the source branch and the target branch. Obviously both of these branches have to be located inside a github remote (possibly but not necessarily the same one), because github doesn't have access to the repository on your own machine. I assume that the first thing that you ask the user is "What branch would you like to be merged?" and that you default to the current branch. But again, this has to be a branch on a github remote, so you have to determine the remote branch that corresponds to the selected local branch (*), not actually the current branch. To determine that branch you should use Lets assume that's non-nil. Now you have to determine the branch into which that is supposed to be merged. If the push remote for the selected source branch is not set, then you have to resort to heuristics (e.g. if only one All of this works well if the user has embraced The Two Remotes. Otherwise it won't. (I am planning to implement (*) Of course you could also ask for a remote branch instead. But that might actually complicate matters because now you have to determine the local branch that corresponds to that remote branch before you can use the upstream of that local branch as the (default) target. |
Hi, first of all thanks for this awesome project! I was using magithub on mac and everything was working flawlessly. Now at work I'm using it on ubuntu and for some reason I cannot open new pull requests (using
H p
) as it always complains:Nothing on remote yet; have you pushed your branch? Aborting
. Is this due to a misconfiguration?The text was updated successfully, but these errors were encountered: