Next: , Previous: , Up: FAQ - Issues and Errors   [Contents][Index]

A.2.6 Diffs contain control sequences

This happens when you configure Git to always color diffs and/or all of its output. The valid values for relevant Git variables color.ui and color.diff are false, true and always, and the default is true. You should leave it that way because then you get colorful output in terminals by default but when git’s output is consumed by something else, then no color control sequences are used.

If you actually use some other tool that requires setting color.ui and/or color.diff to always (which is highly unlikely), then you can override these settings just for Magit by using:

(setq magit-git-global-arguments
      (nconc magit-git-global-arguments
             '("-c" "color.ui=false"
               "-c" "color.diff=false")))