magit/magit — pull request #413 by tarsius (2012-05-11 18:25:20+00:00)
Title: only push to branch.b.merge when pushing to branch.b.remote

Previously given this configuration:

[remote "origin"]
url = git://github.com/magit/magit.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "myremote"]
url = git@github.com:tarsius/magit.git
fetch = +refs/heads/*:refs/remotes/myremote/*
[branch "a-feature-branch"]
remote = origin
merge = refs/heads/next

and `a-feature-branch` checked out

C-u P P myremote

would push to:

myremote/next

which goes completely against what I am used to from plain git. It also doesn't make any sense since `branch..merge` is only meaningful when pushing to `branch..remote`. With my change the branch is pushed to `myremote/a-feature-branch`, which `magit-push`s doc-string calls "falling back to somethin hairy" but I find that behavior to be quite reasonable.