unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39704: 28.0.50; vc-print-branch-log data loss
@ 2020-02-20 23:32 Juri Linkov
  2020-02-21  0:25 ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2020-02-20 23:32 UTC (permalink / raw)
  To: 39704

Tags: patch

Accidentally I noticed that vc-print-branch-log prints a narrower log
than it should.  I don't remember any damage from this data loss
but this is not the right thing to do - by default it should show logs
from the repository root, not logs limited to a subdirectory when
this command happens to be called from a subdirectory.

Am I correct to expect that vc-print-branch-log should print
log from branch's root like vc-print-root-log does, and
not from a subdirectory like vc-print-log does?

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index f7d651fac6..13d60b6fcf 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2559,9 +2590,11 @@ vc-print-branch-log
     (vc-read-revision "Branch to log: ")))
   (when (equal branch "")
     (error "No branch specified"))
-  (vc-print-log-internal (vc-responsible-backend default-directory)
-                         (list default-directory) branch t
-                         (when (> vc-log-show-limit 0) vc-log-show-limit)))
+  (let* ((backend (vc-responsible-backend default-directory))
+         (rootdir (vc-call-backend backend 'root default-directory)))
+    (vc-print-log-internal backend
+                           (list rootdir) branch t
+                           (when (> vc-log-show-limit 0) vc-log-show-limit))))
 
 ;;;###autoload
 (defun vc-log-incoming (&optional remote-location)





^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-09 23:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-20 23:32 bug#39704: 28.0.50; vc-print-branch-log data loss Juri Linkov
2020-02-21  0:25 ` Dmitry Gutov
2020-02-21 18:29   ` Tom Tromey
2020-02-23  0:07   ` Juri Linkov
2020-02-23  8:57     ` Dmitry Gutov
2020-03-09 23:34       ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).