This detects the presence of a VT100 terminal by using the TERM environment variable and switches to using VT100 codes directly under windows if it is found. This makes --progress work correctly with git bash.