From owner-freebsd-questions@freebsd.org Wed Sep 30 16:48:09 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68822A0B8DB for ; Wed, 30 Sep 2015 16:48:09 +0000 (UTC) (envelope-from danglingpointer@outlook.com) Received: from BAY004-OMC2S18.hotmail.com (bay004-omc2s18.hotmail.com [65.54.190.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 562871640 for ; Wed, 30 Sep 2015 16:48:09 +0000 (UTC) (envelope-from danglingpointer@outlook.com) Received: from BAY169-W16 ([65.54.190.124]) by BAY004-OMC2S18.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 30 Sep 2015 09:47:03 -0700 X-TMN: [Vw2j5eW5W/rsYy/Q6BhEgAt5wgj/U9JB] X-Originating-Email: [danglingpointer@outlook.com] Message-ID: From: Dangling Pointer To: Polytropon CC: "freebsd-questions@freebsd.org" Subject: RE: git diff encoding issue when running via Hyper-V Date: Wed, 30 Sep 2015 16:47:03 +0000 Importance: Normal In-Reply-To: <20150930183538.2a5041f7.freebsd@edvax.de> References: , <20150930165744.3437d751.freebsd@edvax.de>, , <20150930175436.c1117526.freebsd@edvax.de>, , <20150930183538.2a5041f7.freebsd@edvax.de> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 30 Sep 2015 16:47:03.0646 (UTC) FILETIME=[A2622FE0:01D0FB9F] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 16:48:09 -0000 Brilliant=2C this is fixed by running: # git config --global core.pager 'less -+F' I first checked with: # git diff | cat # git diff | more # git diff | less and it was showing the desired output. Setting the pager is showing colored= output! =3D) Thanks again Polytropon! I would have never known it without the "pager" ke= yword.=20 > Date: Wed=2C 30 Sep 2015 18:35:38 +0200 > From: freebsd@edvax.de > To: danglingpointer@outlook.com > Subject: Re: git diff encoding issue when running via Hyper-V > CC: freebsd-questions@freebsd.org >=20 > On Wed=2C 30 Sep 2015 16:21:57 +0000=2C Dangling Pointer wrote: >> # echo "This is ^[[31mred^[[m text." >>=20 >>=20 >>=20 >> prints red colored "red" text. :) >>=20 >>=20 >>=20 >> # git diff &1> ../blah.txt >>=20 >> # cat ../blah.txt >>=20 >>=20 >>=20 >> shows: >>=20 >>=20 >>=20 >> [...] >>=20 >> -setup_dirs() >> +setup_dirs2() >>=20 >> [...] >>=20 >>=20 >>=20 >> but >>=20 >>=20 >>=20 >> # git diff >>=20 >>=20 >>=20 >> still emits the mangled output on stdout. >=20 > This seems to suggest that git does not use the default pager > for output ("cat" or "less"). When you pipe the output to one > of those programs=2C like >=20 > % git diff | cat >=20 > or >=20 > % git diff | less >=20 > is the output different? Does the Git documentation provide some > clue about the pager it uses for its diff functionality? >=20 > The problem becomes more clear now. >=20 >=20 >=20 > --=20 > Polytropon > Magdeburg=2C Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe=2C Mousa=2C ... > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe=2C send any mail to "freebsd-questions-unsubscribe@freebsd= .org" =