Is it possible to determine whether git would output colors in the current situation when running a git diff.*.textconv converter?
Example:
git diff
with color.ui=auto
will output colors iff the output is a terminal. I would like the diff.*.textconv converter to also output colors iff the output is a terminal. I can't check within the converter, since git always redirects the output to a non-terminal.
This may be an X-Y problem; I basically just want the best way to syntax-highlight the source content of git diffs, but not if the output is not going to a terminal.