From: Jeff King <peff@peff.net>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Git List" <git@vger.kernel.org>,
"Duy Nguyễn" <pclouds@gmail.com>
Subject: Re: [ITCH] Specify refspec without remote
Date: Wed, 10 Apr 2013 16:05:48 -0400 [thread overview]
Message-ID: <20130410200548.GC24177@sigill.intra.peff.net> (raw)
In-Reply-To: <CALkWK0k44+VnrGTXESdap2nRomdYH8xwz_T2JdhYtSrPR+89sw@mail.gmail.com>
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.
> 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
branch.master.pushremote.
> As the author of branch.<name>.pushremote, I apologize for not having
> caught this earlier. I've been using push.default = current for a
> long time, and don't often think about the other settings.
I don't think pushremote introduced the problem. It is much older than
that, and dates back to respecting branch.*.remote at all for pushes,
even though push.default=matching (and before we had push.default, it
was always matching) does not have anything to do with the current
branch.
-Peff
next prev parent reply other threads:[~2013-04-10 20:05 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 16:58 [ITCH] Specify refspec without remote Ramkumar Ramachandra
2013-03-18 17:08 ` Jeff King
2013-03-19 9:58 ` Ramkumar Ramachandra
2013-03-19 10:02 ` Jeff King
2013-03-19 11:33 ` Duy Nguyen
2013-03-19 11:53 ` Ramkumar Ramachandra
2013-03-19 12:15 ` Duy Nguyen
2013-03-19 13:03 ` Holger Hellmuth (IKS)
2013-03-19 11:58 ` Holger Hellmuth (IKS)
2013-03-19 15:43 ` Junio C Hamano
2013-03-19 15:43 ` Junio C Hamano
2013-04-09 11:44 ` Ramkumar Ramachandra
2013-04-09 17:31 ` Junio C Hamano
2013-04-09 17:39 ` Ramkumar Ramachandra
2013-04-09 17:58 ` Junio C Hamano
2013-04-09 18:03 ` Ramkumar Ramachandra
2013-04-09 18:08 ` Ramkumar Ramachandra
2013-04-09 19:29 ` Junio C Hamano
2013-04-09 23:13 ` Jonathan Nieder
2013-04-09 23:14 ` Jonathan Nieder
2013-04-10 1:19 ` Junio C Hamano
2013-04-10 4:13 ` Jeff King
2013-04-10 16:37 ` Junio C Hamano
2013-04-10 17:27 ` Jeff King
2013-04-10 18:54 ` Junio C Hamano
2013-04-10 18:59 ` Jeff King
2013-04-10 19:31 ` Ramkumar Ramachandra
2013-04-10 19:33 ` Ramkumar Ramachandra
2013-04-10 19:52 ` Jeff King
2013-04-10 20:05 ` Ramkumar Ramachandra
2013-04-10 20:21 ` Jeff King
2013-04-10 20:41 ` Ramkumar Ramachandra
2013-04-10 21:02 ` Ramkumar Ramachandra
2013-04-10 21:32 ` Ramkumar Ramachandra
2013-04-10 20:21 ` Junio C Hamano
2013-04-10 19:53 ` Ramkumar Ramachandra
2013-04-10 20:05 ` Jonathan Nieder
2013-04-10 20:11 ` Jeff King
2013-04-10 21:23 ` Jonathan Nieder
2013-04-10 20:05 ` Jeff King [this message]
2013-04-10 20:19 ` Ramkumar Ramachandra
2013-04-10 20:24 ` Jeff King
2013-04-10 20:55 ` Ramkumar Ramachandra
2013-04-10 21:04 ` Jeff King
2013-04-10 21:11 ` Ramkumar Ramachandra
2013-04-10 21:18 ` Jonathan Nieder
2013-04-10 21:23 ` Ramkumar Ramachandra
2013-04-10 21:29 ` Jonathan Nieder
2013-04-10 21:42 ` Ramkumar Ramachandra
2013-04-10 21:56 ` Jeff King
2013-04-10 22:06 ` Ramkumar Ramachandra
2013-04-10 22:16 ` Jeff King
2013-04-10 22:11 ` Ramkumar Ramachandra
2013-04-10 22:23 ` Jeff King
2013-04-10 22:31 ` Ramkumar Ramachandra
2013-04-11 7:38 ` Ramkumar Ramachandra
2013-04-11 7:45 ` Ramkumar Ramachandra
2013-04-11 21:40 ` Junio C Hamano
2013-04-13 5:07 ` Ramkumar Ramachandra
2013-04-10 20:27 ` Junio C Hamano
2013-04-10 21:15 ` Ramkumar Ramachandra
2013-04-12 22:14 ` Junio C Hamano
2013-04-10 3:50 ` Jeff King
2013-04-10 13:22 ` Ramkumar Ramachandra
2013-04-10 15:56 ` Jeff King
2013-04-10 16:38 ` Junio C Hamano
2013-04-10 17:29 ` Jeff King
2013-04-10 13:19 ` Ramkumar Ramachandra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130410200548.GC24177@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).