git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Finn Arne Gangstad <finnag@pvv.org>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	markus.heidelberg@web.de, git@vger.kernel.org,
	John Tapsell <johnflux@gmail.com>, Andreas Ericsson <ae@op5.se>
Subject: Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured
Date: Fri, 06 Mar 2009 09:17:43 -0800	[thread overview]
Message-ID: <7vr61ash8o.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <m3r61aisdo.fsf@localhost.localdomain> (Jakub Narebski's message of "Fri, 06 Mar 2009 07:25:26 -0800 (PST)")

Jakub Narebski <jnareb@gmail.com> writes:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> ...
>> Speaking of which, Steffen (who cannot reply right now, since he is AFK 
>> for a while) had a patch to install "remote.<branch>.push = HEAD" with 
>> clone and remote.  Would that be better?
>
> Errr... I thought that "remote.<remotename>.push = HEAD" works?
>
> But note that "remote.<name>.push = HEAD" (push current branch only)
> and "remote.<name>.push = :" (push matching branches, i.e. curent
> behavior) works only if you have remote configured... "git push <URL>"
> won't be affected, and people (probably) would want to either have
> 'nothing' as default, or/and be able to configure it to nothing,
> current, or matching (at least).

When you and Dscho contradict with each other, I seem to end up agreeing
with Dscho most of the time, but for this particular one, I completely
agree with you.

I personally think Finn's suggested list is overengineered, and we should
start with only three: "nothing", "current" (aka HEAD), and "matching".
It is Ok to have a separate discussion to figure out what other default
behaviours are desireable, but I think that should come after the dust
settled from the transition, and more importantly, I think the other kinds
of fine-tuned behaviour needs to be per-remote, and is not something the
repository (or user) wide default push.default can cover.

In addition to your counterargument, clone to set up remote.*.push is
introducing an inconsistency between existing and new repositories until
the default is changed for everybody, and the recent trend is to avoid
that kind of inconsistency.  Steffen's patch _could_ use push.default to
infer what kind of remote.*.push to set up when adding a remote (or when
cloning, if you take push.default from $HOME/.gitconfig), but at that
point it becomes a redundant information.

  reply	other threads:[~2009-03-06 17:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05 22:15 [RFC PATCH] git push: Push nothing if no refspecs are given or configured Finn Arne Gangstad
2009-03-05 22:18 ` Sverre Rabbelier
2009-03-05 22:22   ` Markus Heidelberg
2009-03-05 22:25     ` Markus Heidelberg
2009-03-05 22:26       ` Sverre Rabbelier
2009-03-06 10:24         ` Johannes Schindelin
2009-03-06 10:32           ` Junio C Hamano
2009-03-06 11:17             ` Sverre Rabbelier
2009-03-06 11:48             ` Finn Arne Gangstad
2009-03-06 12:07               ` Johannes Schindelin
2009-03-06 13:58                 ` Finn Arne Gangstad
2009-03-06 15:25                 ` Jakub Narebski
2009-03-06 17:17                   ` Junio C Hamano [this message]
2009-03-07  2:06                     ` Johannes Schindelin
2009-03-06 23:00                   ` Johannes Schindelin
2009-03-06 12:26               ` John Tapsell
2009-03-06 15:27                 ` Jakub Narebski
2009-03-05 22:43 ` Junio C Hamano
2009-03-06 10:37 ` Johannes Schindelin
2009-03-09 20:39   ` Markus Heidelberg
2009-03-09 20:48     ` Johannes Schindelin
2009-03-09 21:10       ` Markus Heidelberg
2009-03-09 21:10       ` Jeff King

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=7vr61ash8o.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=ae@op5.se \
    --cc=finnag@pvv.org \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=johnflux@gmail.com \
    --cc=markus.heidelberg@web.de \
    --cc=srabbelier@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).