git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
	Ramkumar Ramachandra <artagnon@gmail.com>,
	Git List <git@vger.kernel.org>, Jeff King <peff@peff.net>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [RFC/PATCH] push: introduce implicit push
Date: Mon, 15 Apr 2013 09:35:59 +0100	[thread overview]
Message-ID: <20130415083558.GB2278@serenity.lan> (raw)
In-Reply-To: <7vzjx01cqn.fsf@alter.siamese.dyndns.org>

On Mon, Apr 15, 2013 at 12:20:32AM -0700, Junio C Hamano wrote:
> Johannes Sixt <j.sixt@viscovery.net> writes:
> 
> > User says:
> >
> >    git push -- master docs release
> >
> > Then git pushes the three branches to three different upstreams. You find
> > that confusing. Do I understanding correctly so far?
> 
> It is far more subtle than that.  User says that while on 'next'
> branch.
> 
> The user has been trained to think "branch.master.remote" takes
> effect while he has "master" branch checked out.
> 
> That is where the possible confusion comes from. As I said number of
> times, you may be able to declare that the confusion is unfounded
> once you think it through.

I may be an atypical user, but my expectation currently is that
branch.<name>.remote is what is used when I run "git push" with no
additional arguments.

This is probably because whenever I add additional arguments (currently)
I have to specify where I am pushing to.

So I think breaking user expectations is a red herring here because the
current behaviour means that users cannot have any expectation of what
will happen in this case.  Either you don't say anything and "git push"
DTRT for your current branch or you must specify precisely what you want
to happen (or at least the remote to use if you have push.default =
matching or remote.<name>.mirror set).

Personally I'd vote for "git push -- master" pushing to
remote.pushdefault, but I really don't know how you handle "git push --"
with the naïve implementation of that - is it the same as "git push" or
"git push $(git config remote.pushdefault)"?

On the other hand, I'm really not sure how often I'd use this feature.
Normally I just use "git push" and if I'm giving any more arguments than
that then it's for something that I don't do often enough for it to be
worth setting up configuration.

  reply	other threads:[~2013-04-15  8:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 15:33 [RFC/PATCH] push: introduce implicit push Ramkumar Ramachandra
2013-04-12 22:28 ` Junio C Hamano
2013-04-13  4:49   ` Ramkumar Ramachandra
2013-04-14  4:42     ` Junio C Hamano
2013-04-14  8:33       ` Jakub Narębski
2013-04-14 13:29       ` Ramkumar Ramachandra
2013-04-15  3:04         ` Junio C Hamano
2013-04-15  7:07           ` Johannes Sixt
2013-04-15  7:20             ` Junio C Hamano
2013-04-15  8:35               ` John Keeping [this message]
2013-04-15  9:17                 ` Ramkumar Ramachandra
2013-04-15  9:46                   ` John Keeping
2013-04-15  9:29                 ` Junio C Hamano
2013-04-15  9:44                   ` Ramkumar Ramachandra
2013-04-15  9:59                   ` John Keeping
2013-04-15 16:39                     ` Felipe Contreras
2013-04-15 17:13                       ` John Keeping
2013-04-15 17:18                         ` Felipe Contreras
2013-04-15  9:35           ` Ramkumar Ramachandra
2013-04-16  2:05             ` Jonathan Nieder
2013-04-16  2:13               ` Jonathan Nieder

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=20130415083558.GB2278@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=jrnieder@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 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).