All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Jeff King <peff@peff.net>
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: Thu, 11 Apr 2013 01:01:33 +0530	[thread overview]
Message-ID: <CALkWK0nKvTiGsjO4zF81nsSuUM=MmmbpdzHWB=4hFR2PiB+LWg@mail.gmail.com> (raw)
In-Reply-To: <20130410185958.GA22394@sigill.intra.peff.net>

Jeff King wrote:
> On Wed, Apr 10, 2013 at 11:54:34AM -0700, Junio C Hamano wrote:
>> > If branch.$name.remote is "when I am on this branch, I want to talk to
>> > this remote", that rule is not be impacted by the presence of refspecs
>> > at all.
>>
>> So running the above while on 'maint' will send master and next to
>> the remote your "git push" would send to when run without any
>> refspecs?
>
> Exactly. The remote selection is orthogonal to the refspecs provided,
> and only cares about which branch you are on.
>
> Which is still kind of weird, because why should the branch you are on
> affect the default push location? But that is how default "matching" has
> always behaved, and we would remain consistent with that.

git push -- master next; pushes to my current branch's
branch.<name>.pushremote?  Isn't that a disaster?

>> That is internally consistent and understandable, and I have no
>> objection to it.  Certainly much better than basing the decision on
>> branch.{master,next}.remote as I thought you were suggesting to do.
>
> No, I am not suggesting that. I can see how such a command might be
> useful (i.e. "push master to where it goes, next to where it goes",
> where "goes" is defined by the upstream config). But that is not
> remotely close to how "git push" works now, and would be inconsistent
> with the other modes (e.g., matching, explicit refspecs, pushing
> non-branches, etc).

Otherwise, I think we're consistent.  git push master; pushes the
refspec master (with no explicit :<dst> counterpart) to the "default
place to push to" (either depending on which branch I am, or global).
I think Junio was mixing up refspecs with refs (branches, and hence
branch configuration) earlier.  git push origin; pushes to "default
refspecs" on the remote origin.  By extension, git push; should push
"default respecs" to the "default place to push to".  The "default
refspecs" in this context is determined by push.default, which is the
problem.

  reply	other threads:[~2013-04-10 19:32 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 [this message]
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
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='CALkWK0nKvTiGsjO4zF81nsSuUM=MmmbpdzHWB=4hFR2PiB+LWg@mail.gmail.com' \
    --to=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.