git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Jay Soffian <jaysoffian@gmail.com>,
	Jason Garber <jgarber@ionzoft.com>,
	git@vger.kernel.org
Subject: Re: [PATCH(TIC)] push: annoy all users by deprecating the default semantics
Date: Tue, 19 Feb 2008 11:37:44 -0500	[thread overview]
Message-ID: <20080219163743.GA31668@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.LSU.1.00.0802191610480.30505@racer.site>

On Tue, Feb 19, 2008 at 04:14:35PM +0000, Johannes Schindelin wrote:

> Subject: [PATCH(TIC)] push: annoy all users by deprecating the default

Heh. It is a good sign that git has made the patch-generation workflow
so pleasant to use that we are willing to make patches for the sake of
humor. :)

> 	FWIW I would resist, just because that config option would change 
> 	the _semantics_ of a git program.
> 
> 	Just think about the IRC channel.  "How do I update only HEAD?" --
> 	"Just say 'git push'" -- "No, that updates nothing" -- "Well, 
> 	works here" -- "But not here!" ... "Can _nobody_ help me?"

Just say "git push origin HEAD"?

> diff --git a/builtin-push.c b/builtin-push.c
> index c8cb63e..7bcb141 100644
> --- a/builtin-push.c
> +++ b/builtin-push.c
> @@ -134,6 +134,14 @@ int cmd_push(int argc, const char **argv, const char *prefix)
>  		flags |= TRANSPORT_PUSH_ALL;
>  	if (mirror)
>  		flags |= (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE);
> +	if (!all && argc < 2)
> +		warning("Pushing without branch names is deprecated.\n"
> +			"Too many users just assumed what it should do\n"
> +			"according to them, got burned, and blamed us,\n"
> +			"the good git developers.\n\n"
> +			"So everybody has to suffer now, and get used to\n"
> +			"new semantics.\n\n"
> +			"Thank you for your time.\n");
>  
>  	if (argc > 0) {
>  		repo = argv[0];

You forgot to add a "--matching" option in case people want to
explicitly request the old behavior. ;P

Seriously, though, I think it is not just new users. It is that for some
(many? most?) people, wanting to push just the HEAD is the _normal_
workflow. So they must remember to always say "git push origin HEAD",
and if they ever forget, the side effects are non-trivial to clean up.

-Peff

  parent reply	other threads:[~2008-02-19 16:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 22:15 git push [rejected] question Jason Garber
2008-02-19  4:33 ` Jeff King
2008-02-19 13:09   ` Jay Soffian
2008-02-19 15:08     ` Jeff King
2008-02-19 15:18       ` Jay Soffian
2008-02-19 15:25         ` Jeff King
2008-02-19 15:59           ` Johannes Schindelin
2008-02-19 16:14           ` [PATCH(TIC)] push: annoy all users by deprecating the default semantics Johannes Schindelin
2008-02-19 16:21             ` Jason Garber
2008-02-19 16:41               ` Johannes Schindelin
2008-02-19 16:37             ` Jeff King [this message]
2008-02-19 16:54               ` Johannes Schindelin
2008-02-19 17:05                 ` Jeff King
2008-02-20  1:03                   ` Govind Salinas
2008-02-20  1:10                     ` Junio C Hamano
2008-02-20  1:21                       ` Govind Salinas
2008-02-20  3:15                         ` Junio C Hamano
2008-02-19 18:40               ` Jay Soffian
     [not found]     ` <E7DE807861E8474E8AC3DC7AC2C75EE50542F62D@34093-EVS2C1.exchange.rackspace.com>
2008-02-19 15:21       ` git push [rejected] question 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=20080219163743.GA31668@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=jaysoffian@gmail.com \
    --cc=jgarber@ionzoft.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).