Skip to content

Commit

Permalink
If git cannot be found then don't try to turn on auto-revert-mode
Browse files Browse the repository at this point in the history
Trying to do so anyway would result in an error.

One special-case is when accessing a remote file using tramp with the
ftp protocol.  For some reason the error message gets inserted into
the file-visiting buffer in that case.

Closes magit#3684.
  • Loading branch information
tarsius committed Dec 7, 2019
1 parent fb338d6 commit 6401ba9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lisp/magit-autorevert.el
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ seconds of user inactivity. That is not desirable."
(magit-turn-on-auto-revert-mode-if-desired)))
(when (and buffer-file-name
(file-readable-p buffer-file-name)
(executable-find magit-git-executable t) ; see #3684
(magit-toplevel)
(or (not magit-auto-revert-tracked-only)
(magit-file-tracked-p buffer-file-name))
Expand Down

0 comments on commit 6401ba9

Please sign in to comment.