title: Disabling git colors only when I log in from certain terminals
body: <h1>Question</h1>
  <p>I want <code>git</code> to automatically colorize the output when it is going to a device that can handle color and not colorize it when it cannot. How would one do this?</p>
  <h2>Background</h2>
  <p>I sometimes develop code for older machines using the machines themselves. Some of them can handle ANSI color and some of them cannot. On UNIX systems we used to have a database called <strong>TERMINFO</strong> which listed capabilities of each terminal. It was easy to tell if a terminal supported color by checking the <code>colors</code> capability. If it was -1, then a program should definitely not send ANSI color sequences.</p>
  <pre><code>$ tput colors
  -1
  </code></pre>
  <p>Ideally, git would use <strong>TERMINFO</strong> to automatically detect if ANSI color sequences are appropriate. But it doesn't and checks only <code>isatty()</code>. I suspect it is not a high priority for the git developers to add <strong>TERMINFO</strong> support, so I'm looking for any workaround that will give the same functionality.</p>
  <p>I already know how to disable git color using <code>git config</code> and that is not what I'm asking. I want it to only be disabled when I log in from a terminal that does not support ANSI colors, such as a Digital VT340.</p>
  <p>I also have already seen the <code>GIT_CONFIG_PARAMETERS=&quot;'color.ui=never'&quot;</code> environment variable, but according to @bk2204 and @torek, that variable is going to disappear soon.</p>