Jeff King wrote:
> On Thu, Apr 11, 2013 at 01:23:57AM +0530, Ramkumar Ramachandra wrote:
>> Ramkumar Ramachandra wrote:
>> > git push -- master next; pushes to my current branch's
>> > branch.<name>.pushremote? Isn't that a disaster?
>> Actually, branch.<name>.pushremote already breaks the current design
>> in a way, as Junio pointed out in a different email: a push.default
>> set to anything except "current" is already nonsensical. Why should
>> "matching" branches be pushed to the remote that my current branch
>> specifies? That might well have their own branch.<name>.pushremote
>> configured, which should be respected.
> I'm not sure that it should be respected. "master" is short for
> "refs/heads/master:refs/heads/master", and does not mean "push master to
> where I have it configured to go" at all. That may be what the user
> means, but changing how "git push" works is going to create
> inconsistency with other cases.
Yes, I know "master" refers to the refspec in the above, not the ref
(ie. branch). Hence branch configuration should have nothing to do
with this. That's just the way things currently are: doesn't mean
that it's perfect; and I'm just throwing ideas around.
>> We should fix this now. I think the fault lies in the rather old
>> design of push.default. Do you have any suggestions as what would
>> make sense here? Ultimately, I think a git push; needs to pick
>> remotes for each refspec separately. The orthogonal design is
>> definitely not right in my opinion.
> Right, the example above might include multiple remotes if pushremote is
> respected. Or it might not come up with an answer at all for a tag.
> If you do:
> git push -- v1.2.3 master
> where does v1.2.3 go? To remote.pushdefault? That seems simple and
> consistent, as there is no ref-specific pushremote defined.
> But I'd
> guess that the user probably _wanted_ it to go to
Huh, why? Simply because he specified master alongside it? How can
we infer what you said in a consistent system?
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html