Skip to content

Conversation

@collin-mcgrath
Copy link

@collin-mcgrath collin-mcgrath commented Jan 19, 2018

It took me a while to figure out why I was never getting results when running this gem, but I eventually tracked it down to my git config having git config color.ui set to always instead of auto. This was including ANSI color codes in the diffs and causing the parser to not match on anything.

The default setting is auto, which colors output when it’s going straight to a terminal, but omits the color-control codes when the output is redirected to a pipe or a file.
You can also set it to always to ignore the difference between terminals and pipes.

I think this will make the gem a bit more robust for anyone else that runs across the same issue.

@collin-mcgrath
Copy link
Author

Annnd I now see that this duplicates #32.

@collin-mcgrath collin-mcgrath deleted the git_diff_no_color branch January 22, 2018 18:11
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

Successfully merging this pull request may close these issues.

1 participant