Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Sep 2015 16:47:03 +0000
From:      Dangling Pointer <danglingpointer@outlook.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   RE: git diff encoding issue when running via Hyper-V
Message-ID:  <BAY169-W16666085430CD3D6C9D558A74D0@phx.gbl>
In-Reply-To: <20150930183538.2a5041f7.freebsd@edvax.de>
References:  <BAY169-W424C7A9E96B8530A5BCAF0A74D0@phx.gbl>, <20150930165744.3437d751.freebsd@edvax.de>, <BAY169-W427D636EB4B23950789C1BA74D0@phx.gbl>, <20150930175436.c1117526.freebsd@edvax.de>, <BAY169-W71C66922F8EC775F053CC4A74D0@phx.gbl>, <20150930183538.2a5041f7.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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" 		 	   		  =



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY169-W16666085430CD3D6C9D558A74D0>