Re: [PATCH 0/3] built-in add -p: support diff-so-fancy better
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 24, 2022, 06:27 UTC
- Message-ID
- <1r3pq48q-s728-8r2r-r4q3-72413r5483o1@tzk.qr>
- In-Reply-To
- <ab012782-1d02-b90b-9a4a-179ecc3f8e9e@gmail.com>
Hi Philippe,
On Tue, 23 Aug 2022, Philippe Blain wrote:
Show 17 quoted lines
> Le 2022-08-23 à 14:04, Johannes Schindelin via GitGitGadget a écrit : > > Philippe Blain reported in > > https://lore.kernel.org/git/ecf6f5be-22ca-299f-a8f1-bda38e5ca246@gmail.com > > that there is a problem when running the built-in version of git add -p with > > diff-so-fancy [https://github.com/so-fancy/diff-so-fancy] as diff colorizer. > > The symptom is this: > > > > error: could not parse colored hunk header '?[36m?[1m?[38;5;13m@ file:1 @?[1m?[0m' > > > > > > This patch series addresses that and should fix > > https://github.com/so-fancy/diff-so-fancy/issues/437 > > Thanks for the quick reaction! > I've verified that the patches fix the example in my reproducer, and they also fix it > if using "delta --color-only" as interactive.diffFilter. Delta is another diff colorizer > (and more) that's facing the same issue as diff-so-fancy [1].
Great!
Show 8 quoted lines
> However, I've tried it on a more "real-life" example, and then I get: > > error: mismatched output from interactive.diffFilter > hint: Your filter must maintain a one-to-one correspondence > hint: between its input and output lines. > > This is despite using "diff-so-fancy --patch" as interactive.diffFilter, which should > keep the number of lines the same.
Would you mind sharing the example with me?
Thanks, Dscho
Show 14 quoted lines
> This ('--patch') was added in [2], about a month after Peff wrote the message
> you mention in https://lore.kernel.org/git/s40ss309-3311-o08s-38r2-9144r33pq549@tzk.qr/.
>
> Again, when using the Perl version with this new example, it works correctly. I'll try to come up with a new
> reproducer for this... But this new example does work with delta with the builtin version,
> so it might be diff-so-fancy that's the culprit...
>
> Cheers,
>
> Philippe.
>
> [1] https://github.com/dandavison/delta/issues/1114
> [2] https://github.com/so-fancy/diff-so-fancy/commit/13d3f8949e15dd62f6b49bc652fe94af6a9bfc79
>