0

Here is an example of a copy of the output of the magit log output with -s with the actual names omitted. (The ESC character precedes each of the [31 and [32 sequences in the following example in the Emacs output.)

b1fe5d2 Ignore files in the template

Author:    omit
Committer: omit


 .gitignore | 142 [32m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[m[31m--[m
 1 file changed, 138 insertions(+), 4 deletions(-)

Update 2020-07-01

My ~/.gitconfig file had

[color]
    ui = true

as surmised by @phils

After the change to ui = auto, the colors in the diff stats are properly drawn, even when I add show graph in color -c flag as well.

  • 2
    Do you perhaps have [color] ui = always set in your git config? If so, then use auto instead of always so that git can choose sensibly. You never want to be telling git to include ansi colour escape codes in the output it's passing to Magit. – phils Jun 30 at 4:29
1

Note Well:

If @phils would like to post an answer I would be happy to delete this one. Let me know by tomorrow.

As @phils suggested in the comments to the OP, the problem was solved by using the following in the ~/.gitconfig file:

[color]
    ui = auto

The problem was caused by the following stanza in the ~/.gitconfig file

color
    ui = true
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.