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

Re: [PATCH v2 2/4] push: colorize errors

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 6, 2018, 11:15 UTC
Message-ID
<nycvar.QRO.7.76.6.1804061313070.55@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
In-Reply-To
<CA+P7+xp6fDbabGVKDsRFhixkWRKTuUo_A3UqbQscsBbKiOJmmA@mail.gmail.com>
Hi Jake,
On Thu, 5 Apr 2018, Jacob Keller wrote:
Show 31 quoted lines
> On Thu, Apr 5, 2018 at 3:48 PM, Johannes Schindelin
> <johannes.schindelin@gmx.de> wrote:
> > From: Ryan Dammrose <ryandammrose@gmail.com>
> >
> > This is an attempt to resolve an issue I experience with people that are
> > new to Git -- especially colleagues in a team setting -- where they miss
> > that their push to a remote location failed because the failure and
> > success both return a block of white text.
> >
> > An example is if I push something to a remote repository and then a
> > colleague attempts to push to the same remote repository and the push
> > fails because it requires them to pull first, but they don't notice
> > because a success and failure both return a block of white text. They
> > then continue about their business, thinking it has been successfully
> > pushed.
> >
> > This patch colorizes the errors and hints (in red and yellow,
> > respectively) so whenever there is a failure when pushing to a remote
> > repository that fails, it is more noticeable.
> >
> > [jes: fixed a couple bugs, added the color.{advice,push,transport}
> > settings, refactored to use want_color_stderr().]
> >
> > Signed-off-by: Ryan Dammrose ryandammrose@gmail.com
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > squash! push: colorize errors
> >
> > Stop talking about localized errors
> 
> Guessing you intended to remove this part after squashing?
Hah! You caught be red-handed.

This was intended as a reminder, as you probably guessed, to remove any mentions of "localized errors" because I had verified that there was no localized error message; besides, I replaced the call to strstr() looking at the error message with a call to push_had_errors() (i.e. using the ref_status instead). So there are definitely no issues about localized errors left.

> Didn't see anything else to comment on in the actual code.

Thank you, Dscho

Previous: Jacob KellerNext: Johannes Schindelin
Message 9 of 22 in “Colorize some errors on stderr”
  1. 0/1 Colorize some errors on stderrJohannes Schindelin, Feb 16, 2018
  2. 1/1 Colorize push errorsJohannes Schindelin, Feb 16, 2018
  3. Junio C HamanoFeb 16, 2018
  4. Johannes SchindelinApr 6, 2018
  5. 0/4 Colorize push errorsJohannes Schindelin, Apr 5, 2018
  6. 1/4 color: introduce support for colorizing stderrJohannes Schindelin, Apr 5, 2018
  7. 2/4 push: colorize errorsJohannes Schindelin, Apr 5, 2018
  8. Jacob KellerApr 5, 2018
  9. Johannes SchindelinApr 6, 2018
  10. 3/4 Add a test to verify that push errors are colorfulJohannes Schindelin, Apr 5, 2018
  11. Eric SunshineApr 6, 2018
  12. Johannes SchindelinApr 6, 2018
  13. 4/4 Document the new color.* settings to colorize push errors/hintsJohannes Schindelin, Apr 5, 2018
  14. Eric SunshineApr 6, 2018
  15. Johannes SchindelinApr 6, 2018
  16. Eric SunshineApr 7, 2018
  17. 0/4 Colorize push errorsJohannes Schindelin, Apr 21, 2018
  18. 1/4 color: introduce support for colorizing stderrJohannes Schindelin, Apr 21, 2018
  19. 2/4 push: colorize errorsJohannes Schindelin, Apr 21, 2018
  20. 3/4 Add a test to verify that push errors are colorfulJohannes Schindelin, Apr 21, 2018
  21. 4/4 Document the new color.* settings to colorize push errors/hintsJohannes Schindelin, Apr 21, 2018
  22. Ævar Arnfjörð BjarmasonApr 6, 2018

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.