revert buffers using a globalized variant of auto-revert-mode
Replace the old magit-specific auto-revert implementation with the mode `magit-auto-revert-mode', a globalized variant of the built-in `auto-revert-mode'. By default Magit still explicitly triggers the reverts after running git for side-effects. Automatic reverts are still enabled by default, and Magit is less verbose about it. The behavior can be tuned using `magit-auto-revert-' and `auto-revert-' options. The main benefit of this change is that this implementation caches whether a file is tracked or not. The old implementation determined this on every revert cycle, which did not perform well when there were many open buffers and/or many tracked files.
Showing with 450 additions and 561 deletions