bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#41974: 28.0.50; Some vc commands refuse to work when called on non-f


From: Dmitry Gutov
Subject: bug#41974: 28.0.50; Some vc commands refuse to work when called on non-file buffer
Date: Sun, 21 Jun 2020 03:07:40 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 21.06.2020 02:55, Juri Linkov wrote:
I think this restriction should be lifted, so vc commands should
work even when called on non-file buffers whose default-directory
is inside the vc project.

Agreed.

Does this patch help, or does it miss more cases?

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 9b12d44978..36013fcdc9 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2563,7 +2563,7 @@ vc-print-branch-log
     (vc-read-revision "Branch to log: ")))
   (when (equal branch "")
     (error "No branch specified"))
-  (let* ((backend (vc-responsible-backend default-directory))
+  (let* ((backend (vc-deduce-backend))
          (rootdir (vc-call-backend backend 'root default-directory)))
     (vc-print-log-internal backend
                            (list rootdir) branch t





reply via email to

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