I've configured git to use meld as the difftool, but I sometimes need to see textual diffs when working over SSH. Is there any way to configure git so that it uses the proper diff tool for the environment?
My current .gitconfig:
[diff]
external = meld
tool = meld
[merge]
external = meld
tool = meld
[difftool]
prompt = false
Write a differ that checks the environment and invokes the right diff engine and put that in your config.