Copy link
@tarsius

tarsius Aug 19, 2016

Contributor

Magit's blob buffers are no longer an issue because I have made the change mentioned above.

can we identify a new class of buffers it should skip?

Indirect buffers are a problem. If diff-hl-mode is enabled in the base buffer, then it's also enabled in the indirect buffer. I believe reset_buffer_local_variables is taking care of that and that turn-on-diff-hl-mode isn't involved here.

buffer-file-name is nil in indirect buffers. So when diff-hl-magit-post-refresh tries to revert an indirect buffer before the base buffer (afterwards there would be nothing left to revert), then it performs (file-in-directory-p nil topdir) but the first argument cannot be nil here.
This could be fixed by first making sure (buffer-file-name buf) does not return nil. Maybe there's another approach, but this one is cheap and a quick fix.