doomemacs/modules/tools/magit
Henrik Lissner dd34802523
revert: compat
emacs-straight/compat@2a9cf8b7bd -> emacs-straight/compat@cc1924fd8b

compat is a dependency of magit and doom-modeline (among other
packages), but a recent bug on compat@2a9cf8b caused #6583, so I am
pinning it to a stable commit. It's not common that Doom pins 2nd/3rd
order dependencies, but I will consider doing that more going forward.

Pinning them across multiple modules isn't elegant, but a better
solution is in the works as part of #4273.

Fix: #6583
Ref: #4273
2022-07-31 16:56:14 +02:00
..
autoload.el fix(magit): only revert if buffer file exists 2022-06-18 17:19:23 +02:00
config.el fix(magit): {1-4} overriding evil keybinds 2022-06-17 21:52:18 +02:00
packages.el revert: compat 2022-07-31 16:56:14 +02:00
README.org tools/magit: add magit-diff-refine-hunk to readme 2020-10-18 16:38:07 +02:00

tools/magit

Description

This module provides Magit, an interface to the Git version control system.

If you are new to Magit, see the Getting Started section of its project readme.

Maintainers

This module has no dedicated maintainers.

Module Flags

  • +forge Enable Forge; a porcelain for managing issues and PRs from within Emacs. Will take a while on first run to build emacsql-sqlite.

Plugins

Hacks

  • forge was modified to defer compilation of emacsql-sqlite until you try to use forge, rather than when magit first loads (which could be as soon as startup).
  • magit has been modified to recognize $XDG_CACHE_HOME/git/credential/socket.
  • magit has been modified to invalidate the projectile cache when you check out a new branch or commit.
  • magit has been modified to revert repo buffers (e.g. after changing branches) when you later switch to them, rather than all at once.

Prerequisites

This module requires git.

Forge will require a Github API token the first time you run forge-pull.

TODO Features

Configuration

Add these to $DOOMDIR/config.el.

Enable Gravatars

This will enable gravatars when viewing commits. The service used by default is Libravatar.

(setq magit-revision-show-gravatars '("^Author:     " . "^Commit:     "))

Enable granular diff-highlights for all hunks

By default, changes are highlighted linewise for all but the selected hunk. This has performance reasons. You can enable character-wise highlights for all visible hunks with:

(after! magit
  (setq magit-diff-refine-hunk 'all))

TODO Troubleshooting