diff options
| author | Dmitry Gutov | 2017-04-30 19:25:23 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2017-05-01 04:30:01 +0300 |
| commit | af736528b9efaabc52b2599d9ced3aed964a07c3 (patch) | |
| tree | a7a4c1ac5377357840ac436e838bec324284c007 | |
| parent | b6aa3446df5e715fd74f010afad75c3c8589a9a1 (diff) | |
| download | emacs-af736528b9efaabc52b2599d9ced3aed964a07c3.tar.gz emacs-af736528b9efaabc52b2599d9ced3aed964a07c3.zip | |
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).
| -rw-r--r-- | lisp/vc/vc-git.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 1a3f1bf2f48..4767cbf88c6 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -1274,9 +1274,8 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." | |||
| 1274 | 1274 | ||
| 1275 | (defun vc-git-next-revision (file rev) | 1275 | (defun vc-git-next-revision (file rev) |
| 1276 | "Git-specific version of `vc-next-revision'." | 1276 | "Git-specific version of `vc-next-revision'." |
| 1277 | (let* ((default-directory (file-name-directory | 1277 | (let* ((default-directory (vc-git-root file)) |
| 1278 | (expand-file-name file))) | 1278 | (file (file-relative-name file)) |
| 1279 | (file (file-name-nondirectory file)) | ||
| 1280 | (current-rev | 1279 | (current-rev |
| 1281 | (with-temp-buffer | 1280 | (with-temp-buffer |
| 1282 | (and | 1281 | (and |