I am sending patch that fixes the issue. It fixes the issue for me on Emacs' current master branch. The patch also cleanly applies to emacs-26 branch. I tested using Mitchel Humpherys' repro method, i.e. $ cd /path/to/emacs $ ./src/emacs -Q lisp/*.el [ M-x global-auto-revert-mode ] $ for i in $(seq 30); do for f in lisp/*.el; do echo "; $i" >> $f; done; git commit -am "test $i"; done Without the fix I could reproduce the issue, and with the fix I could not reproduce even if running the loop 100 times instead of 30. Emacs was reloading a lot of files very fast, but no locking errors happened in the shell which ran the loop. 2018-02-15 20:08 GMT+01:00 Alexei Khlebnikov : > Judging from the comment of the commit implementing the > "--no-optional-locks" switch, > > https://github.com/git/git/commit/27344d6a6c8056664966e11acf674e5da6dd7ee3 > ​ > , the switch was implemented exactly for background refresh in "tools like > IDEs or fancy editors". > I.e. for mitigating this particular bug! Now we only have to use this > switch in our "fancy editor". > >