git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH(TIC)] push: annoy all users by deprecating the default semantics

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 19, 2008, 16:54 UTC
Message-ID
<alpine.LSU.1.00.0802191651550.30505@racer.site>
In-Reply-To
<20080219163743.GA31668@sigill.intra.peff.net>
Hi,
On Tue, 19 Feb 2008, Jeff King wrote:
Show 7 quoted lines
> 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. :)
Yeah, code talks... even humourously ;-)
Show 8 quoted lines
> > 	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"?

The point is: if that becomes the default (with a certain config option), people will get used to typing "git push". They will not even _know_ about the explicit form.

Show 22 quoted lines
> > 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
See followup.

BTW if that is really the way to go, we will have to have a _long_ period (I am talking about 6-12 _months_ if not more) where there _must not_ be a default action for git-push. Otherwise people _will_ get more confused than necessary.

Ciao, Dscho

Previous: Jeff KingNext: Jeff King
Message 12 of 19 in “git push [rejected] question”
  1. Jason GarberFeb 18, 2008
  2. Jeff KingFeb 19, 2008
  3. Jay SoffianFeb 19, 2008
  4. Jeff KingFeb 19, 2008
  5. Jay SoffianFeb 19, 2008
  6. Jeff KingFeb 19, 2008
  7. Johannes SchindelinFeb 19, 2008
  8. push: annoy all users by deprecating the default semanticsJohannes Schindelin, Feb 19, 2008
  9. Jason GarberFeb 19, 2008
  10. Johannes SchindelinFeb 19, 2008
  11. Jeff KingFeb 19, 2008
  12. Johannes SchindelinFeb 19, 2008
  13. Jeff KingFeb 19, 2008
  14. Govind SalinasFeb 20, 2008
  15. Junio C HamanoFeb 20, 2008
  16. Govind SalinasFeb 20, 2008
  17. Junio C HamanoFeb 20, 2008
  18. Jay SoffianFeb 19, 2008
  19. Jeff KingFeb 19, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.