[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Navigate by color in `git-diff --color-moved=plain`
From: |
Greg Chicares |
Subject: |
Re: [lmi] Navigate by color in `git-diff --color-moved=plain` |
Date: |
Thu, 25 Apr 2019 09:46:48 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 2019-04-24 23:00, Vadim Zeitlin wrote:
> On Wed, 24 Apr 2019 22:40:07 +0000 Greg Chicares <address@hidden> wrote:
[...]
> GC> the older log shows a regular trace, but the newer log traces
> GC> the middle ('w1') line differently:
> GC>
> GC> + winepath -w /opt/lmi/x86_64-w64-mingw32/local/bin
> GC> + sed -es/\\/\\\\/g
> GC> + w0=Z:\\opt\\lmi\\x86_64-w64-mingw32\\local\\bin
> GC> + winepath -w+ /opt/lmi/x86_64-w64-mingw32/local/lib
> GC> sed -es/\\/\\\\/g
> GC> + w1=Z:\\opt\\lmi\\x86_64-w64-mingw32\\local\\lib
> GC> + winepath -w /opt/lmi/third_party/bin
> GC> + sed -es/\\/\\\\/g
> GC> + w2=Z:\\opt\\lmi\\third_party\\bin
> GC>
> GC> Any idea what's going on there?
>
> Absolutely none, but this looks like a bug in dash (this is executed by
> dash, isn't it?)
Yes:
$grep '#!' install_msw.sh
#!/bin/sh
$ls -o /bin/sh
lrwxrwxrwx 1 root 4 Mar 19 11:44 /bin/sh -> dash
> to me... I'm not sure what exactly do I need to do to see
> this, so it's easier to ask you:
>
> 1. Is this reproducible?
> 2. If yes, does it still happen with bash instead of dash?
I just ran the script again, and the anomaly was not reproduced:
it's back to the expected
+ winepath -w /opt/lmi/third_party/bin
+ sed -es/\\/\\\\/g
> (of course, if it's not reproducible, it's arguably even worse, but I have
> no idea how to debug it then).
There's really nothing more we can do, except resume this thread later
if any similar anomaly is seen in future.
> GC> git diff --no-index --color=always --color-moved=plain \
> GC> ../log-20190424T2109Z ../log-20190421T2325Z-good \
> GC> |sed -e's/^.\[3[12]m/ZZZ/' |less -RS
[...]
> The idea with "ZZZ" (I'd probably use something like "+ " instead and just
> search for "^++ ") is nice, but why not preserve the colours as well to
> still make the changes stand out visually?
>
> E.g. something like (untested):
>
> sed -e's/^.\[31m/&YYY/' -e's/^.\[32m/&ZZZ/'
Thanks, that's another nice improvement. I'll add this to my handy list
in 'gwc/develop1.txt'.
- [lmi] Navigate by color in `git-diff --color-moved=plain`, Greg Chicares, 2019/04/24
- Re: [lmi] Navigate by color in `git-diff --color-moved=plain`, Vadim Zeitlin, 2019/04/24
- Re: [lmi] Navigate by color in `git-diff --color-moved=plain`, Greg Chicares, 2019/04/24
- Re: [lmi] Navigate by color in `git-diff --color-moved=plain`, Vadim Zeitlin, 2019/04/24
- Re: [lmi] Navigate by color in `git-diff --color-moved=plain`,
Greg Chicares <=
- Re: [lmi] Navigate by color in `git-diff --color-moved=plain`, Greg Chicares, 2019/04/25
- Re: [lmi] Making "dash -x" more atomic (was: Navigate by color in `git-diff --color-moved=plain`), Vadim Zeitlin, 2019/04/25
- Re: [lmi] Making "dash -x" more atomic, Greg Chicares, 2019/04/25
- Re: [lmi] Making "dash -x" more atomic, Vadim Zeitlin, 2019/04/29
- Re: [lmi] Making "dash -x" more atomic, Greg Chicares, 2019/04/29
- Re: [lmi] Making "dash -x" more atomic, Vadim Zeitlin, 2019/04/29
Re: [lmi] Navigate by color in `git-diff --color-moved=plain`, Vadim Zeitlin, 2019/04/24