]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-deduce-fileset): Handle log-view-mode derivatives specially
authorDmitry Gutov <dmitry@gutov.dev>
Wed, 3 Jan 2024 00:11:56 +0000 (02:11 +0200)
committerDmitry Gutov <dmitry@gutov.dev>
Wed, 3 Jan 2024 00:12:36 +0000 (02:12 +0200)
* lisp/vc/vc.el (vc-deduce-fileset):
Handle log-view-mode derivatives specially, that helps after
switching projects (bug#68174).

lisp/vc/vc.el

index 69097c180f206f2c3b2d7c1063acb9a775fd0535..7b2301ee3e5d1cda34d8c4a56eb0f055ee3a4c2e 100644 (file)
@@ -1074,6 +1074,7 @@ Within directories, only files already under version control are noticed."
 
 (defvar vc-dir-backend)
 (defvar log-view-vc-backend)
+(defvar log-view-vc-fileset)
 (defvar log-edit-vc-backend)
 (defvar diff-vc-backend)
 (defvar diff-vc-revisions)
@@ -1155,6 +1156,8 @@ BEWARE: this function may change the current buffer."
              (vc-state buffer-file-name)
              (vc-checkout-model backend buffer-file-name))
        (list backend (list buffer-file-name))))
+     ((derived-mode-p 'log-view-mode)
+      (list log-view-vc-backend log-view-vc-fileset))
      ((and (buffer-live-p vc-parent-buffer)
            ;; FIXME: Why this test?  --Stef
            (or (buffer-file-name vc-parent-buffer)