emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/vc-got 6eda2f1 035/145: vc-got-log-incoming


From: ELPA Syncer
Subject: [elpa] externals/vc-got 6eda2f1 035/145: vc-got-log-incoming
Date: Thu, 9 Sep 2021 15:58:28 -0400 (EDT)

branch: externals/vc-got
commit 6eda2f1f013325ef2ba8a49de9b6ed701c166fe9
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>

    vc-got-log-incoming
---
 vc-got.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/vc-got.el b/vc-got.el
index 7182391..2eb93c5 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -78,9 +78,12 @@
 ;; HISTORY FUNCTIONS
 ;; * print-log                          DONE
 ;; * log-outgoing                       DONE
-;; * log-incoming                       NOT IMPLEMENTED
+;; * log-incoming                       DONE
 ;; - log-search                         DONE
 ;; - log-view-mode                      NOT IMPLEMENTED
+;; - show-log-entry                     NOT IMPLEMENTED
+;; - comment-history                    NOT IMPLEMENTED
+;; - update-changelog                   NOT IMPLEMENTED
 
 ;; TODO: use the idiom
 ;;      (let (process-file-side-effects) ...)
@@ -489,6 +492,15 @@ LIMIT limits the number of commits, optionally starting at 
START-REVISION."
     (with-current-buffer buffer
       (vc-got--log nil nil nil rl))))
 
+(defun vc-got-incoming (buffer remote-location)
+  "Fill BUFFER with the diff between the REMOTE-LOCATION and the local 
worktree branch."
+  (let ((rl (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 (vc-got--current-branch) rl))))
+
 ;; XXX: vc.el specify only pattern, but in reality this takes a buffer
 ;; and a pattern.
 (defun vc-got-log-search (buffer pattern)



reply via email to

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