]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/diff-hl/README.md
Merge commit 'e93367512080e540dc5dd126dfcb38b4a5e9415b' from diff-hl
[gnu-emacs-elpa] / packages / diff-hl / README.md
index ab8c9d81e25031b5a87fcc172033b2651a8892ed..725466b46d62cefe238ab00cf47b0059156a94a6 100644 (file)
@@ -52,6 +52,16 @@ Notes
   it's only accurate when the buffer is in saved state. Check out\r
   `diff-hl-flydiff-mode`, it aims to handle unsaved buffers as well.\r
 \r
+* To use an\r
+  [alternative diff algorithm](http://stackoverflow.com/questions/32365271/whats-the-difference-between-git-diff-patience-and-git-diff-histogram)\r
+  with Git, add a corresponding argument to `vc-git-diff-switches`,\r
+  e.g. `(setq vc-git-diff-switches '("--histogram"))`. Using the\r
+  `diff.algorithm` option doesn't work\r
+  [because](http://article.gmane.org/gmane.comp.version-control.git/294622)\r
+  `vc-git-diff` calls `git diff-index`. `diff-hl-flydiff-mode` does\r
+  not support alternative algorithms, because it uses the external\r
+  `diff` program.\r
+\r
 * We conflict with other modes when they put indicators on the fringe,\r
   such as [Flycheck](https://github.com/flycheck/flycheck). This is\r
   rarely a significant problem, since if you're using such a mode,\r
@@ -90,5 +100,11 @@ psvn
 Magit\r
 -----\r
 \r
-If you have a recent enough version installed, it defines\r
-`magit-revert-buffer-hook` (or `magit-not-reverted-hook`), which we use.\r
+If you're using a version before 2.4.0, it defines `magit-revert-buffer-hook`\r
+(or `magit-not-reverted-hook`), which we use.\r
+\r
+When using Magit 2.4 or newer, add this to your init script:\r
+\r
+```lisp\r
+(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)\r
+```\r