[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got 518ede1 010/145: augment vc-got--log
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got 518ede1 010/145: augment vc-got--log |
Date: |
Thu, 9 Sep 2021 15:58:23 -0400 (EDT) |
branch: externals/vc-got
commit 518ede14d1f7da94e0e6e1216bdce4dd33be55ca
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
augment vc-got--log
---
vc-got.el | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/vc-got.el b/vc-got.el
index 0208d51..0c2a5a1 100644
--- a/vc-got.el
+++ b/vc-got.el
@@ -71,6 +71,7 @@
(require 'subr-x))
(require 'cl-lib)
+(require 'cl-seq)
(require 'seq)
(require 'vc)
@@ -99,17 +100,27 @@
(with-temp-buffer
(apply #'vc-got--call "add" (append vc-register-switches files))))
-(defun vc-got--log (limit path)
+(defun vc-got--log (&optional path limit start-commit search-pattern)
"Execute the log command in the worktree of PATH.
-
-The output of the command will be put in the current-buffer.
+The output in the current buffer.
LIMIT limits the maximum number of commit returned.
+START-COMMIT: start 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
worktree."
- (vc-got-with-worktree path
- (zerop (vc-got--call "log" "-l" (format "%s" limit) path))))
+ (vc-got-with-worktree (or path default-directory)
+ (zerop
+ (apply #'vc-got--call
+ (cl-remove-if #'null
+ (flatten-list
+ (list "log"
+ (when limit (list "-l" (format "%s" limit)))
+ (when start-commit (list "-c" start-commit))
+ (when search-pattern (list "-s"
search-pattern))
+ path)))))))
(defun vc-got--status (dir-or-file &rest files)
"Return the output of ``got status''.
@@ -251,7 +262,7 @@ DIR-OR-FILE."
"Return the id of the last commit that touched the FILE or \"0\" for a new
(but added) file."
(or
(with-temp-buffer
- (when (vc-got--log 1 file)
+ (when (vc-got--log file 1)
(let (start)
(goto-char (point-min))
(forward-line 1) ;skip the ----- line
- [elpa] externals/vc-got 5682e01 005/145: add .gitignore, (continued)
- [elpa] externals/vc-got 5682e01 005/145: add .gitignore, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 23a0b46 002/145: implemented some state-changing functions, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 9e805da 004/145: defalias vc-got-responsible-p to vc-got-root, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 009222a 006/145: add licence, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got f18d3e1 012/145: Summary: add todo to vc-got-diff, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 35b3a91 016/145: correct also the other example, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 4093d2f 008/145: fix vc-got-registered, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 1ca0183 014/145: Summary: fix use-package example, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 08ca3c5 007/145: added readme, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got c0c9a33 009/145: docs improvement, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 518ede1 010/145: augment vc-got--log,
ELPA Syncer <=
- [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, 2021/09/09