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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors in "diff -u | d-s-f" stop working with stripLeadingSymbols = false #466

Open
patrikndv opened this issue Mar 25, 2023 · 1 comment

Comments

@patrikndv
Copy link

patrikndv commented Mar 25, 2023

When not having any settings in the [color "diff-highlight"] section of gitconfig, the highlight still works in git commands by inverting foreground and background colors. When additionally setting stripLeadingSymbols = false, the behaviour is still correct in git commands. So far so good.

However, with stripLeadingSymbols = false the behaviour is not correct anymore when piping the output of diff -u to diff-so-fancy. Assuming diff-highlight settings are set, only lines with highlight will be colored but all other +/- lines will have no color at all. When diff-highlight settings are not set, no +/- line at all will have color (not even the lines with highlight). Expected behavior is that stripLeadingSymbols = false should not affect coloring of +/- lines, and when diff-highlight settings are not set the highlight should invert foreground and background colors like it does correctly in git commands and when stripLeadingSymbols = true.

@patrikndv patrikndv changed the title Colors in "diff -u | d-s-n" stop working with stripLeadingSymbols = false Colors in "diff -u | d-s-f" stop working with stripLeadingSymbols = false Mar 26, 2023
@scottchiefbaker
Copy link
Contributor

Can you provide the gitconfig you're using, and an diff that triggers this behavior?

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

2 participants