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

Re: [PATCH] push: Provide situational hints for non-fast-forward errors

From
Christopher Tiwald <christiwald@gmail.com>
Date
Mar 14, 2012, 15:52 UTC
Message-ID
<20120314155204.GC3558@gmail.com>
In-Reply-To
<vpqipi7zh3n.fsf@bauges.imag.fr>
On Wed, Mar 14, 2012 at 10:06:52AM +0100, Matthieu Moy wrote:
Show 7 quoted lines
> Depending on the outcome of the discussion in the thread about
> 'push.default', you may want to suggest 'current' instead of upstream:
> http://thread.gmane.org/gmane.comp.version-control.git/192547/focus=192694
> 
> Actually, if the user has 'push.default=matching', the least surprising
> move from this value is 'push.default=current', that will push a subset
> of what used to be pushed, and won't change the target branch.

My only concern about 'push.default=current' vs. 'upstream' is the case where a developer might push to a central shared repository, but has a local branch tracking a remote branch with a different name. That might be too deep in the edge-case weeds, but it seems like for 'centralized' git users, 'upstream' covers more cases without any distraction to their workflows.

Show 12 quoted lines
> Your patch removes the _(...) around the string, which breaks the
> internationalization.
> ...
> > +	for (i = 0; i < ARRAY_SIZE(message_advice_pull_before_push); i++)
> > +		advise(message_advice_pull_before_push[i]);
> 
> I'm no expert in gettext, but I think the internationalization people
> will have a hard time dealing with a single message split accross an
> array.
> 
> Actually, I prefer the effect of a single advise() call (i.e. say
> "hint:" just once, not for each line), but this part is subjective.

The lack of support for internationalization is an oversight. I'll correct it in v2.

> I'd give the full cut-and-paste ready command to set the variable, to
> help the user who doesn't know what "configuration variable" really
> means in the context of Git.

Makes a lot of sense. I remember struggling with setting config variables when I was new to git. I'll make that change.

-- Christopher Tiwald

Previous: Matthieu MoyNext: Junio C Hamano
Message 13 of 28 in “push: Provide situational hints for non-fast-forward errors”
  1. push: Provide situational hints for non-fast-forward errorsChristopher Tiwald, Mar 13, 2012
  2. Junio C HamanoMar 14, 2012
  3. Zbigniew Jędrzejewski-SzmekMar 14, 2012
  4. Matthieu MoyMar 14, 2012
  5. Zbigniew Jędrzejewski-SzmekMar 14, 2012
  6. Christopher TiwaldMar 14, 2012
  7. Clemens BuchacherMar 15, 2012
  8. Junio C HamanoMar 15, 2012
  9. Matthieu MoyMar 16, 2012
  10. Christopher TiwaldMar 14, 2012
  11. Christopher TiwaldMar 14, 2012
  12. Matthieu MoyMar 14, 2012
  13. Christopher TiwaldMar 14, 2012
  14. Junio C HamanoMar 14, 2012
  15. Junio C HamanoMar 16, 2012
  16. Clemens BuchacherMar 16, 2012
  17. Junio C HamanoMar 16, 2012
  18. Christopher TiwaldMar 16, 2012
  19. Junio C HamanoMar 16, 2012
  20. Junio C HamanoMar 16, 2012
  21. Clemens BuchacherMar 16, 2012
  22. Junio C HamanoMar 16, 2012
  23. Clemens BuchacherMar 16, 2012
  24. Junio C HamanoMar 16, 2012
  25. push: Provide situational hints for non-fast-forward errorsZbigniew Jędrzejewski-Szmek, Mar 17, 2012
  26. Christopher TiwaldMar 17, 2012
  27. Zbigniew Jędrzejewski-SzmekMar 17, 2012
  28. Junio C HamanoMar 19, 2012

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.