git diff encoding issue when running via Hyper-V
Michael B. Eichorn
ike at michaeleichorn.com
Wed Sep 30 16:48:06 UTC 2015
On Wed, 2015-09-30 at 18:35 +0200, Polytropon wrote:
> On Wed, 30 Sep 2015 16:21:57 +0000, Dangling Pointer wrote:
> > # echo "This is ^[[31mred^[[m text."
> >
> >
> >
> > prints red colored "red" text. :)
> >
> >
> >
> > # git diff &1> ../blah.txt
> >
> > # cat ../blah.txt
> >
> >
> >
> > shows:
> >
> >
> >
> > [...]
> >
> > -setup_dirs()
> > +setup_dirs2()
> >
> > [...]
> >
> >
> >
> > but
> >
> >
> >
> > # git diff
> >
> >
> >
> > still emits the mangled output on stdout.
>
> 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, like
>
> % git diff | cat
>
> or
>
> % git diff | less
>
> is the output different? Does the Git documentation provide some
> clue about the pager it uses for its diff functionality?
git(1) uses $PAGER unless overridden using $GIT_PAGER
> The problem becomes more clear now.
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5761 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20150930/d6ddc097/attachment.bin>
More information about the freebsd-questions
mailing list