[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got a2474a4 048/145: improve vc-got-dir-status-files
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got a2474a4 048/145: improve vc-got-dir-status-files |
Date: |
Thu, 9 Sep 2021 15:58:31 -0400 (EDT) |
branch: externals/vc-got
commit a2474a45dd5b17500561db24bec5680ec7224737
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
improve vc-got-dir-status-files
show also missing/deleted files in vc-dir. This isn't perfect yet,
because adding a temporary file and removing it will confuse the
vc-dir buffer.
---
vc-got.el | 36 +++++++++++++++---------------------
1 file changed, 15 insertions(+), 21 deletions(-)
diff --git a/vc-got.el b/vc-got.el
index 0aa37df..bbbf7a1 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -372,27 +372,21 @@ DIR-OR-FILE."
;; (vc-got-state "/usr/ports/mystuff/non-existant")
(defun vc-got-dir-status-files (dir files update-function)
- (let* ((files (seq-filter (lambda (file)
- (and (not (string= file ".."))
- (not (string= file "."))
- (not (string= file ".got"))))
- (or files
- (directory-files dir))))
- (statuses (vc-got--parse-status
- (apply #'vc-got--status dir files)))
- (default-directory dir))
- (cl-loop
- with result = nil
- for file in files
- do (setq result
- (cons
- (if (file-directory-p file)
- (list file 'unregistered nil)
- (if-let (status (cdr (assoc file statuses #'string=)))
- (list file status nil)
- (list file 'up-to-date nil)))
- result))
- finally (funcall update-function result nil))))
+ (let ((fs (seq-filter (lambda (file)
+ (and (not (string= file ".."))
+ (not (string= file "."))
+ (not (string= file ".got"))))
+ (or files
+ (directory-files dir)))))
+ (cl-loop with result = (mapcar (lambda (x)
+ (list (car x) (cdr x) nil))
+ (vc-got--parse-status
+ (apply #'vc-got--status dir files)))
+ for file in fs
+ do (unless (cadr (assoc file result #'string=))
+ (cl-pushnew (list file 'up-to-date nil)
+ result))
+ finally (funcall update-function result nil))))
;; (let ((dir "/usr/ports/mystuff"))
;; (vc-got-dir-status-files dir nil (lambda (res _t)
- [elpa] externals/vc-got 45b0e76 023/145: typo in vc-got-pull, (continued)
- [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
- [elpa] externals/vc-got b34e96f 036/145: Emacs upstream has fixed the documentation, comment not needed, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got df20ca2 040/145: add vc-got--program-version command to return version number, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got d54ceb8 041/145: make got program be customizable, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 7c257a7 042/145: Merge pull request #1 from zmyrgel/feature/expand-implementation-status, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got f09d635 045/145: Merge pull request #2 from zmyrgel/feature/add-version-command, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got febb894 043/145: Add new customization group `vc-got' under vc, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got a2474a4 048/145: improve vc-got-dir-status-files,
ELPA Syncer <=
- [elpa] externals/vc-got 7bb16f7 053/145: implement conflicted-files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 3cdb075 058/145: update status list a bit, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got cf4e3eb 070/145: fix vc-got-dir-status-files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 6f42ede 081/145: don't create temp buffers for nothing, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got b2721e8 080/145: set status to 'staged if a file has all its modification staged, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got dec54a7 088/145: improve vc-got-{push, pull}, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 424f515 100/145: don't need annotate-current-time; split the sections, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got ad36649 092/145: due piccoli errori di battitura corretti, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 6a973a7 106/145: simplify vc-got-root, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got e7747ce 109/145: use log-edit-extract-headers instead of the ugly workaround, ELPA Syncer, 2021/09/09