Fix Git revision navigation in currently removed directories

* lisp/vc/vc-git.el (vc-git-next-revision): Use the repo root as
default-directory because FILE's parent directory might not exist
anymore (bug#26345).
This commit is contained in:
Dmitry Gutov 2017-04-30 19:25:23 +03:00
parent b6aa3446df
commit af736528b9

View file

@ -1274,9 +1274,8 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
(defun vc-git-next-revision (file rev)
"Git-specific version of `vc-next-revision'."
(let* ((default-directory (file-name-directory
(expand-file-name file)))
(file (file-name-nondirectory file))
(let* ((default-directory (vc-git-root file))
(file (file-relative-name file))
(current-rev
(with-temp-buffer
(and