From: John Tapsell <johnflux@gmail.com>
To: Finn Arne Gangstad <finnag@pvv.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Sverre Rabbelier <srabbelier@gmail.com>,
markus.heidelberg@web.de, git@vger.kernel.org,
Andreas Ericsson <ae@op5.se>
Subject: Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured
Date: Fri, 6 Mar 2009 12:26:59 +0000 [thread overview]
Message-ID: <43d8ce650903060426y776474fi10acc5495b88fa7@mail.gmail.com> (raw)
In-Reply-To: <20090306114812.GA19534@pvv.org>
2009/3/6 Finn Arne Gangstad <finnag@pvv.org>:
> On Fri, Mar 06, 2009 at 02:32:53AM -0800, Junio C Hamano wrote:
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>>
>> > On Thu, 5 Mar 2009, Sverre Rabbelier wrote:
>> >
>> >> On Thu, Mar 5, 2009 at 23:25, Markus Heidelberg
>> >> <markus.heidelberg@web.de> wrote:
>> >> > Oh, I confused "config option" with "command line argument"...
>> >>
>> >> Right, I'd like to be able to do:
>> >> $ git config push.iamnotretarded true
>> >> $ git push
>> >
>> > LOL! Sverre, you have a way to crack me up...
>>
>> I found it amusing, too.
>>
>> It may have some correlation with how well organized your work habit is,
>> but I do not think it has much correlation with being retarded. It is
>> more about "'matching refs' is the perfect default for _my_ use pattern,
>> don't mess with it, please".
>
> So here is my current WIP suggestion for a new "push.default"
> variable, I am not sure if a single entry can express all useful
> choices, or if it is a good idea to introduce more default choices
> other than "nothing" (with the goal of making it the default in a
> later release).
>
> I think all the values here make sense as a --option to git push
> though (except --nothing...)
>
> Suggested new entry in config.txt:
>
> push.default::
> Defines the action git push should take if no refspec is given
> on the command line, no refspec is configured in the branch, and
> no refspec is implied by any of the options given on the command
> line.
> +
> The term `current remote` means the remote configured for the current
> branch, or `origin` if no remote is set. `origin` is also used if
> you are not on a branch at all.
> +
> * `nothing` do not push anything
> * `matching` push all matching branches to the current remote.
> All branches having the same name in both ends are considered to be
> matching. This is the default value.
> * `same-remote` push all matching branches that are configured to use
> the current remote. Branches with no remote configuration are not pushed.
> * `tracked` push all branches that are tracking a branch on the current
> remote to their counterpart.
How about 'current', to simply push the current the branch. It could
even prompt if it's not tracked yet.
Most (all?) other revision control systems have this 'current'
behaviour by default.
John
next prev parent reply other threads:[~2009-03-06 12:29 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
2009-03-07 2:06 ` Johannes Schindelin
2009-03-06 23:00 ` Johannes Schindelin
2009-03-06 12:26 ` John Tapsell [this message]
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=43d8ce650903060426y776474fi10acc5495b88fa7@mail.gmail.com \
--to=johnflux@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=ae@op5.se \
--cc=finnag@pvv.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).