0

I would like to know if there is a way to alter the way Magit highlight the current checked out branch on the magit-log. git log --decorate will show the HEAD at the checked out commit and Magit show an @ when checking out a commit (with no branch), but, when a branch is checked out, the branch name is enclosed in a rectangle as shown below:

enter image description here

However, when running emacs from a terminal, the same checked out branch will appear as:

enter image description here

As you can see, it is not possible to identify the current checked out branch from.

I tried to customize-face but this did not work...

Thank you for the help, Lorenzo

Lorenzo Trojan
  • 117
  • 1
  • 9
  • 3
    I recommend that you ask questions about Emacs, and especially Magit, on http://emacs.stackexchange.com. – tarsius Jan 06 '16 at 23:56

1 Answers1

1

Customize magit-branch-current so that it differs from magit-branch-local. The difference obviously has to involve a property which actually has an effect in a terminal, such as the foreground color.

tarsius
  • 8,147
  • 5
  • 32
  • 46
  • Note also that you can specify face properties on a per display type basis when you customize. So, if desirable, you could leave the GUI version as-is, but specify terminal-only properties. In the Customize Face UI, under the "State" menu, select "For all kinds of displays", and then you can INSert a new entry with a "Display" option of "specific display", and configure accordingly... – phils Jan 07 '16 at 00:41
  • so modifying the face is the only way to highlight the current branch? Would it not be possible to show ``HEAD`` just as in ``git log --decorate``? – Lorenzo Trojan Jan 07 '16 at 08:03
  • A line `abcdef HEAD some-branch some new feature` is ambiguous. It doesn't tell you whether `some-branch` is checked out, or whether `HEAD` is detached and just happens to point to the same commit as `some-branch`. – tarsius Jan 07 '16 at 11:06