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

Re: [PATCH] sideband.c: Get rid of ANSI sequences for non-terminal shell

From
Jeff King <peff@peff.net>
Date
Jun 2, 2014, 06:30 UTC
Message-ID
<20140602062959.GA27254@sigill.intra.peff.net>
In-Reply-To
<81E85F13A4BE084BAF4B1AA24173EDA0144E14B7@JWPKEXMBX03.corp.checkfree.com>
On Fri, May 30, 2014 at 11:10:51PM +0000, Naumov, Michael (North Sydney) wrote:
Show 19 quoted lines
> Some git tools such as GitExtensions for Windows use environment
> variable TERM=msys which causes the weird ANSI sequence shown for the
> messages returned from server-side hooks
> We add those ANSI sequences to help format sideband data on the user's
> terminal. However, GitExtensions is not using a terminal, and the ANSI
> sequences just confuses it. We can recognize this use by checking
> isatty().
> See https://github.com/gitextensions/gitextensions/issues/1313 for
> more details
> 
> NOTE: I considered to cover the case that a pager has already been
> started. But decided that is probably not worth worrying about here,
> though, as we shouldn't be using a pager for commands that do network
> communications (and if we do, omitting the magic line-clearing signal
> is probably a sane thing to do).
> 
> Signed-off-by: Michael Naumov <mnaoumov@gmail.com>
> Thanks-to: Erik Faye-Lund <kusmabite@gmail.com>
> Thanks-to: Jeff King <peff@peff.net>
This version looks fine to me.
-Peff
Previous: Naumov, Michael (North Sydney)Next: Junio C Hamano
Message 2 of 3 in “sideband.c: Get rid of ANSI sequences for non-terminal shell”
  1. sideband.c: Get rid of ANSI sequences for non-terminal shellNaumov, Michael (North Sydney), May 30, 2014
  2. Jeff KingJun 2, 2014
  3. Junio C HamanoJun 2, 2014

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.