[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got 9ad1eb5 025/145: implemented vc-got-log-outgoing
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got 9ad1eb5 025/145: implemented vc-got-log-outgoing |
Date: |
Thu, 9 Sep 2021 15:58:26 -0400 (EDT) |
branch: externals/vc-got
commit 9ad1eb5d84e342aa18e2520976253104d6103418
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
implemented vc-got-log-outgoing
it shows an extra commit, but it's a start!
---
vc-got.el | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/vc-got.el b/vc-got.el
index 5c03daa..3af9891 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -75,7 +75,7 @@
;;
;; HISTORY FUNCTIONS
;; * print-log DONE
-;; * log-outgoing NOT IMPLEMENTED
+;; * log-outgoing DONE
;; * log-incoming NOT IMPLEMENTED
;; - log-search DONE
;; - log-view-mode NOT IMPLEMENTED
@@ -130,13 +130,14 @@
(with-temp-buffer
(apply #'vc-got--call "add" (append vc-register-switches files))))
-(defun vc-got--log (&optional path limit start-commit search-pattern)
+(defun vc-got--log (&optional path limit start-commit stop-commit
search-pattern)
"Execute the log command in the worktree of PATH.
The output in the current buffer.
LIMIT limits the maximum number of commit returned.
START-COMMIT: start traversing history at the specified commit.
+STOP-COMMIT: stop traversing history at the specified commit.
SEARCH-PATTERN: limit to log messages matched by the regexp given.
Return nil if the command failed or if PATH isn't included in any
@@ -149,6 +150,7 @@ worktree."
(list "log"
(when limit (list "-l" (format "%s" limit)))
(when start-commit (list "-c" start-commit))
+ (when stop-commit (list "-x" stop-commit))
(when search-pattern (list "-s"
search-pattern))
path)))))))
@@ -443,13 +445,24 @@ LIMIT limits the number of commits, optionally starting
at START-REVISION."
(cl-loop for file in files
do (vc-got--log (file-relative-name file) 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))
+ (inhibit-read-only t))
+ (with-current-buffer buffer
+ (vc-got--log nil nil nil rl))))
+
;; XXX: vc.el specify only pattern, but in reality this takes a buffer
;; and a pattern.
(defun vc-got-log-search (buffer pattern)
"Search commits for PATTERN and write the results found in BUFFER."
(with-current-buffer buffer
(let ((inhibit-read-only t))
- (vc-got--log nil nil nil pattern))))
+ (vc-got--log nil nil nil nil pattern))))
;; TODO: async
;; TODO: we should append (vc-switches 'got 'diff) to the switches.
- [elpa] externals/vc-got 518ede1 010/145: augment vc-got--log, (continued)
- [elpa] externals/vc-got 518ede1 010/145: augment vc-got--log, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got eb85ad2 011/145: implemented remaninig state-changing and some history functions, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 4571b1f 013/145: Summary: got log expects a relative path, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 30dcede 015/145: remove ``Summary'' from the commit, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 694534b 017/145: implemented vc-got-mode-line-string, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 345290b 020/145: improve vc-got–diff and vc-got-diff, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 52a1813 021/145: add-to-list is better at strings than cl-pushnew, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got f2e1ddb 028/145: document vc-got-stage-mode, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 686eac9 026/145: implemented vc-got-push, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got a8466f0 022/145: implement dir-extra-headers, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 9ad1eb5 025/145: implemented vc-got-log-outgoing,
ELPA Syncer <=
- [elpa] externals/vc-got a5e9be3 029/145: fix table, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got cdd3e16 030/145: use vc-find-root instead of vc-got-root, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 6eda2f1 035/145: vc-got-log-incoming, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 986bd9a 038/145: fix diff on multiple files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 0e25fbe 039/145: expand the vc function status list, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got e79563b 044/145: make got program customizable, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 45b0e76 023/145: typo in vc-got-pull, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 5dec261 033/145: kill got stage/unstage buffer after utilisation and introduce unstage-all, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 12ca62f 034/145: implement vc-got-diff-switches, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 406d7b4 037/145: switch to GPLv3, ELPA Syncer, 2021/09/09