Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 String mismatch encountered while superimposing style sections: ' ' vs 'E' #1360

Open
joshtriplett opened this issue Mar 19, 2023 · 5 comments

Comments

@joshtriplett
Copy link
Contributor

joshtriplett commented Mar 19, 2023

I tried to run git grep -C10 ULT_MAN in the man-db git repository https://salsa.debian.org/debian/man-db.git, and got a panic:

thread 'main' panicked at 'String mismatch encountered while superimposing style sections: ' ' vs 'E'', /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/git-delta-0.15.1/src/paint.rs:931:17

If I do git --no-pager grep --color=always -C1 ULT_MAN | delta I can reproduce the problem. However, if I redirect the output into a file, and then cat that file through delta, that doesn't reproduce the problem.

delta-bug.txt

@dandavison
Copy link
Owner

Thanks @joshtriplett!

I tried to run git grep -C10 ULT_MAN in the man-db git repository https://salsa.debian.org/debian/man-db.git, and got a panic:

I can reproduce this.

@joshtriplett
Copy link
Contributor Author

Ran into another "String mismatch" panic in the same repository, with git grep manpath; that one seems like it might be related to having a non-UTF-8 character on a line, as delta stops right before the line with that character (in it.po).

@vphantom
Copy link

That would make sense, as I have git diff consistently making delta crash on our repo which has lots of ISO-8859-1 files. 馃槙

@dandavison
Copy link
Owner

Thanks, we should fix this; should be a reasonably doable fix if anyone feels like looking into it. But if not I'll try to get to it soon and then make a release.

@th1000s
Copy link
Contributor

th1000s commented Apr 18, 2023

This seems to be related to #1172, see also trishume/syntect#450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants