emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master af73652 1/3: Fix Git revision navigation in current


From: Dmitry Gutov
Subject: [Emacs-diffs] master af73652 1/3: Fix Git revision navigation in currently removed directories
Date: Sun, 30 Apr 2017 21:30:19 -0400 (EDT)

branch: master
commit af736528b9efaabc52b2599d9ced3aed964a07c3
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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).
---
 lisp/vc/vc-git.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 1a3f1bf..4767cbf 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\"."
 
 (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]