From: Jeff King Date: Mon, 02 Jun 2014 06:30:00 GMT Subject: Re: [PATCH] sideband.c: Get rid of ANSI sequences for non-terminal shell 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: > 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 > Thanks-to: Erik Faye-Lund > Thanks-to: Jeff King This version looks fine to me. -Peff