all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom Tromey <tom@tromey.com>
Cc: 28466@debbugs.gnu.org
Subject: bug#28466: 26.0.50; diff in vc-outgoing doesn't work properly
Date: Sat, 16 Sep 2017 15:53:57 -0600	[thread overview]
Message-ID: <8760ciwbre.fsf@tromey.com> (raw)
In-Reply-To: <87h8w4shq5.fsf@tromey.com> (Tom Tromey's message of "Thu, 14 Sep 2017 22:34:10 -0600")

Tom> I was expecting to see a diff showing the combined contents of all 3 of
Tom> my outgoing patches.

Tom> However, the generated diff is missing the oldest patch in the series.

The appended patch fixes this for me.
I'll put it on the Emacs 26 branch after a few days, unless there are
comments.

Tom

diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el
index 52f56ed..d6963d0 100644
--- a/lisp/vc/log-view.el
+++ b/lisp/vc/log-view.el
@@ -608,10 +608,16 @@ log-view-diff-changeset
     (log-view-diff-common beg end t)))
 
 (defun log-view-diff-common (beg end &optional whole-changeset)
-  (let ((to (log-view-current-tag beg))
-        (fr (log-view-current-tag end)))
-    (when (string-equal fr to)
-      ;; TO and FR are the same, look at the previous revision.
+  (let* ((to (log-view-current-tag beg))
+         (fr-entry (log-view-current-entry end))
+         (fr (cadr fr-entry)))
+    ;; When TO and FR are the same, or when point is on a line after
+    ;; the last entry, look at the previous revision.
+    (when (or (string-equal fr to)
+              (>= (point)
+                  (save-excursion
+                    (goto-char (car fr-entry))
+                    (forward-line))))
       (setq fr (vc-call-backend log-view-vc-backend 'previous-revision nil fr)))
     (vc-diff-internal
      t (list log-view-vc-backend





  reply	other threads:[~2017-09-16 21:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15  4:34 bug#28466: 26.0.50; diff in vc-outgoing doesn't work properly Tom Tromey
2017-09-16 21:53 ` Tom Tromey [this message]
2017-09-19  0:39   ` Dmitry Gutov
2017-09-19  2:17 ` bug#28466: doneu Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760ciwbre.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=28466@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.