branch: externals/vc-got
commit a1839dca295586955508d60963109ea4480afeb8
Author: Omar Polo <[email protected]>
Commit: Omar Polo <[email protected]>

    don't include the common commit in log-outgoing
    
    log-outgoing used to include also the latest commit in
    REMOTE-LOCATION, and it's misleading (i.e. vc-log-outgoing on a sync'd
    repository would still list a commit).
    
    This fixes it by calling next-revision on the remote-location, which
    is nil when we're in sync with upstream.
---
 vc-got.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/vc-got.el b/vc-got.el
index 4a5d303..eb6ac1d 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -689,13 +689,14 @@ START-REVISION."
                                limit
                                start-revision)))))
 
-;; XXX: this includes also the latest commit in REMOTE-LOCATION.
 (defun vc-got-log-outgoing (buffer remote-location)
   "Fill BUFFER with the diff between the local worktree branch and 
REMOTE-LOCATION."
   (vc-setup-buffer buffer)
-  (let ((rl (if (or (not remote-location) (string-empty-p remote-location))
-                (concat "origin/" (vc-got--current-branch))
-              remote-location))
+  (let ((rl (vc-got-next-revision
+             nil
+             (if (or (not remote-location) (string-empty-p remote-location))
+                 (concat "origin/" (vc-got--current-branch))
+               remote-location)))
         (inhibit-read-only t))
     (with-current-buffer buffer
       (vc-got--log nil nil nil rl))))

Reply via email to