2

I'm a Magit rookie and finding it is not behaving as expected. I have multiple unstaged changes in a repository (see "Git Status" below). However, Magit is not showing them (see "Magit" below) when I use magit-status. For an additional oddity, the section lising recent commits with hashes and commit messages is not visible in the magit buffer. I only noticed them when I cut and pasted from the buffer in order to make this message. I'm using the 20191123 of Magit on Emacs 26.3 on MacOS 10.14.6.

Any hints as to where things may not be going right? Thank you.

## Magit

Head:     master Refine gitignore
Merge:    origin/master Refine gitignore
Push:     origin/master Refine gitignore

Untracked files (6)
.org-id-locations
annotations
diary


Recent commits
3d97a67 origin/master Refine gitignore
17b56f0 Refine .gitignore
4caad13 Set shell to MacPort's zsh


[33mdiff --git .persistent-scratch .persistent-scratch[m
[33mindex cedd81b..185a428 100644[m

## Git status

On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  modified:   .persistent-scratch
  modified:   ac-comphist.dat
  modified:   custom.el
  modified:   myinit.org
  modified:   recentf
  modified:   savehist

Untracked files:
  (use "git add <file>..." to include in what will be committed)
  .org-id-locations
  annotations
  diary

no changes added to commit (use "git add" and/or "git commit -a")
3
  • That sounds very strange. Perhaps purge that installation of Magit and instead install the most recent stable release from stable.melpa.org/#/magit and see if that behaves differently?
    – phils
    Commented Nov 28, 2019 at 3:00
  • 2
    That "[33mdiff" stuff at the bottom of the magit output looks very suspicious. Have you got a very funky PS1 setting?
    – rpluim
    Commented Nov 28, 2019 at 9:10
  • 2
    Have you set color.ui in your git config? E.g, see github.com/magit/magit/issues/733
    – npostavs
    Commented Nov 28, 2019 at 12:13

1 Answer 1

2

In line with the suggests above, it was a problem with my Git config. Commenting the following lines out of my config file resolved the issue.

# [color]
#   ui = always
# [color "diff-highlight"]
#   # oldNormal = red bold
#   oldHighlight = red bold 52
#   newNormal = green bold
#   newHighlight = green bold 22
# [color "diff"]
  # commit = green
  # meta = yellow
  # frag = cyan
  # old = red
  # new = green
  # whitespace = red reverse
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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