16 ms·
Since git 2.9 there is another experimental, opt-in, improvement to git diff that results in more readable diffs: Heuristics that try to capture the logical cha
by TimWolla 9y ago
Since git 2.9 there is another experimental, opt-in, improvement to git diff that results in more readable diffs: Heuristics that try to capture the logical changes better. By default git tries to delay the start of diffs as long as possible leading to bogus highlighting of e.g. doc comments (slash star star).
See https://github.com/blog/2188-git-2-9-has-been-released https://github.com/blog/2188-git-2-9-has-been-released (section Beautiful diffs) for an example and http://blog.deveo.com/whats-new-in-git-2-11/#experimentalheuristicsgitdiff http://blog.deveo.com/whats-new-in-git-2-11/#experimentalheu... for another similar option that I did not try yet.
- ronjouch 9y agoThanks for the tip! For readers in a hurry, careful: `compactionHeuristic` ended up deprecated in Git 2.11 . The experimental heuristic to add to a >=2.11 .gitconfig is now `indentHeuristic`, see OP's second link :)
- GauntletWizard 9y agoI don't see anything about it being deprecated, just that there's a new one. (It's also somewhat unclear what happens if you enable both)
- avar 9y agoThe compactionHeuristic was removed entirely in the 2.12.0 release. You can't enable both since only the indentHeuristic exists now, and serves pretty much the same purpose.
- GauntletWizard 9y agoAnd here's the release note for that: https://github.com/git/git/blob/master/Documentation/RelNotes/2.12.0.txt#L157 https://github.com/git/git/blob/master/Documentation/RelNote... Thanks!